2020-12-22 04:54:52

by kernel test robot

[permalink] [raw]
Subject: [KVM] fdd90b978b: WARNING:suspicious_RCU_usage


Greeting,

FYI, we noticed the following commit (built with gcc-9):

commit: fdd90b978b4e0dbbdf0f50f6dd01569a569ad614 ("[PATCH v2 15/16] KVM: x86: declare Xen HVM shared info capability and add test case")
url: https://github.com/0day-ci/linux/commits/David-Woodhouse/KVM-Add-Xen-hypercall-and-shared-info-pages/20201206-190926
base: https://git.kernel.org/cgit/linux/kernel/git/mst/vhost.git linux-next

in testcase: kernel-selftests
version: kernel-selftests-x86_64-b5a583fb-1_20201015
with following parameters:

group: kvm
ucode: 0xe2

test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
test-url: https://www.kernel.org/doc/Documentation/kselftest.txt


on test machine: 8 threads Intel(R) Core(TM) i7-6770HQ CPU @ 2.60GHz with 32G memory

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>


kern :warn : [ 86.138096] WARNING: suspicious RCU usage
kern :warn : [ 86.142286] 5.10.0-rc5-gfdd90b978b4e #1 Tainted: G I
kern :warn : [ 86.148879] -----------------------------
kern :warn : [ 86.153110] include/linux/kvm_host.h:633 suspicious rcu_dereference_check() usage!
kern :warn : [ 86.160992]
other info that might help us debug this:

kern :warn : [ 86.169413]
rcu_scheduler_active = 2, debug_locks = 1
kern :warn : [ 86.176231] no locks held by xen_shinfo_test/10611.
kern :warn : [ 86.181328]
stack backtrace:
kern :warn : [ 86.185946] CPU: 2 PID: 10611 Comm: xen_shinfo_test Tainted: G I 5.10.0-rc5-gfdd90b978b4e #1
kern :warn : [ 86.196092] Hardware name: /NUC6i7KYB, BIOS KYSKLi70.86A.0041.2016.0817.1130 08/17/2016
kern :warn : [ 86.204517] Call Trace:
kern :warn : [ 86.207122] dump_stack+0x8d/0xb5
kern :warn : [ 86.210615] kvm_map_gfn+0xbb/0xc0
kern :warn : [ 86.214127] kvm_xen_map_guest_page+0x5c/0x100
kern :warn : [ 86.218787] kvm_xen_hvm_set_attr+0xf8/0x1c0
kern :warn : [ 86.223275] kvm_arch_vm_ioctl+0xae9/0xc80
kern :warn : [ 86.227549] ? preempt_count_sub+0xa1/0xe0
kern :warn : [ 86.231777] ? _raw_spin_unlock+0x29/0x40
kern :warn : [ 86.235954] ? do_fault+0x22d/0x4e0
kern :warn : [ 86.239627] kvm_vm_ioctl+0x313/0xd80
kern :warn : [ 86.243481] ? find_held_lock+0x2b/0x80
kern :warn : [ 86.247500] __x64_sys_ioctl+0x83/0xc0
kern :warn : [ 86.251445] do_syscall_64+0x33/0x40
kern :warn : [ 86.255125] entry_SYSCALL_64_after_hwframe+0x44/0xa9
kern :warn : [ 86.260398] RIP: 0033:0x7f63eac65427
kern :warn : [ 86.264172] Code: 00 00 90 48 8b 05 69 aa 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 39 aa 0c 00 f7 d8 64 89 01 48
kern :warn : [ 86.283684] RSP: 002b:00007ffcafb0b078 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
kern :warn : [ 86.291524] RAX: ffffffffffffffda RBX: 000000004028aec8 RCX: 00007f63eac65427
kern :warn : [ 86.298957] RDX: 00007ffcafb0b0e0 RSI: 000000004028aec8 RDI: 0000000000000006
kern :warn : [ 86.306361] RBP: 000000000040a7d0 R08: 000000000040be70 R09: 000000004028aec8
kern :warn : [ 86.313753] R10: 0000000000000001 R11: 0000000000000246 R12: 00000000004017e0
kern :warn : [ 86.321286] R13: 00007ffcafb0b2c0 R14: 0000000000000000 R15: 0000000000000000
user :notice: [ 94.700635] gcc -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 -fno-stack-protector -fno-PIE -I../../../../tools/include -I../../../../tools/arch/x86/include -I../../../../usr/include/ -Iinclude -Ix86_64 -Iinclude/x86_64 -I.. -pthread -no-pie x86_64/cr4_cpuid_sync_test.c /usr/src/perf_selftests-x86_64-rhel-7.6-kselftests-fdd90b978b4e0dbbdf0f50f6dd01569a569ad614/tools/testing/selftests/kvm/libkvm.a -o /usr/src/perf_selftests-x86_64-rhel-7.6-kselftests-fdd90b978b4e0dbbdf0f50f6dd01569a569ad614/tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test

user :notice: [ 110.220295] gcc -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 -fno-stack-protector -fno-PIE -I../../../../tools/include -I../../../../tools/arch/x86/include -I../../../../usr/include/ -Iinclude -Ix86_64 -Iinclude/x86_64 -I.. -pthread -no-pie x86_64/evmcs_test.c /usr/src/perf_selftests-x86_64-rhel-7.6-kselftests-fdd90b978b4e0dbbdf0f50f6dd01569a569ad614/tools/testing/selftests/kvm/libkvm.a -o /usr/src/perf_selftests-x86_64-rhel-7.6-kselftests-fdd90b978b4e0dbbdf0f50f6dd01569a569ad614/tools/testing/selftests/kvm/x86_64/evmcs_test



To reproduce:

git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp install job.yaml # job file is attached in this email
bin/lkp run job.yaml



Thanks,
Oliver Sang


Attachments:
(No filename) (5.00 kB)
config-5.10.0-rc5-gfdd90b978b4e (214.12 kB)
job-script (5.96 kB)
kmsg.xz (31.68 kB)
kernel-selftests (68.43 kB)
job.yaml (4.95 kB)
reproduce (137.00 B)
Download all attachments

2020-12-22 09:44:00

by David Woodhouse

[permalink] [raw]
Subject: Re: [KVM] fdd90b978b: WARNING:suspicious_RCU_usage

On Tue, 2020-12-22 at 13:06 +0800, kernel test robot wrote:
>
> kern :warn : [ 86.138096] WARNING: suspicious RCU usage
> kern :warn : [ 86.142286] 5.10.0-rc5-gfdd90b978b4e #1 Tainted: G I
> kern :warn : [ 86.148879] -----------------------------
> kern :warn : [ 86.153110] include/linux/kvm_host.h:633 suspicious rcu_dereference_check() usage!
> kern :warn : [ 86.160992]
> other info that might help us debug this:
>
> kern :warn : [ 86.169413]
> rcu_scheduler_active = 2, debug_locks = 1
> kern :warn : [ 86.176231] no locks held by xen_shinfo_test/10611.
> kern :warn : [ 86.181328]
> stack backtrace:
> kern :warn : [ 86.185946] CPU: 2 PID: 10611 Comm: xen_shinfo_test Tainted: G I 5.10.0-rc5-gfdd90b978b4e #1
> kern :warn : [ 86.196092] Hardware name: /NUC6i7KYB, BIOS KYSKLi70.86A.0041.2016.0817.1130 08/17/2016
> kern :warn : [ 86.204517] Call Trace:
> kern :warn : [ 86.207122] dump_stack+0x8d/0xb5
> kern :warn : [ 86.210615] kvm_map_gfn+0xbb/0xc0
> kern :warn : [ 86.214127] kvm_xen_map_guest_page+0x5c/0x100
> kern :warn : [ 86.218787] kvm_xen_hvm_set_attr+0xf8/0x1c0
> kern :warn : [ 86.223275] kvm_arch_vm_ioctl+0xae9/0xc80


Thanks. FWIW all this mapping code was removed in the last version of
the series.


Attachments:
smime.p7s (5.05 kB)