Greeting,
FYI, we noticed the following commit (built with gcc-9):
commit: 39be2e28180a2e87af5fbb8d83643812e1a3b371 ("KVM: selftests: Add selftest for KVM statistics data binary interface")
https://git.kernel.org/cgit/virt/kvm/kvm.git queue
in testcase: kernel-selftests
version: kernel-selftests-x86_64-7ae2585b-1_20210607
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]>
[ 386.205633] WARNING: CPU: 5 PID: 6926 at mm/usercopy.c:75 usercopy_warn (kbuild/src/consumer/mm/usercopy.c:75 (discriminator 18))
[ 386.213477] Modules linked in: netconsole btrfs blake2b_generic xor zstd_compress raid6_pq libcrc32c intel_rapl_msr intel_rapl_common sd_mod t10_pi sg x86_pkg_temp_thermal i915 intel_powerclamp coretemp crct10dif_pclmul ipmi_devintf crc32_pclmul crc32c_intel ghash_clmulni_intel ipmi_msghandler sdhci_pci intel_wmi_thunderbolt cqhci rapl ahci sdhci vfio_mdev vfio_iommu_type1 libahci intel_cstate mei_me i2c_i801 mmc_core vfio libata mei intel_uncore joydev i2c_smbus mdev intel_pch_thermal ir_rc6_decoder intel_gtt wmi rc_rc6_mce nuvoton_cir rc_core video intel_pmc_core acpi_pad ip_tables
[ 386.267149] CPU: 3 PID: 6926 Comm: kvm_binary_stat Tainted: G I 5.13.0-rc1-00239-g39be2e28180a #1
[ 386.277815] Hardware name: /NUC6i7KYB, BIOS KYSKLi70.86A.0041.2016.0817.1130 08/17/2016
[ 386.286169] RIP: 0010:usercopy_warn (kbuild/src/consumer/mm/usercopy.c:75 (discriminator 18))
[ 386.290702] Code: 80 82 41 51 49 89 c0 49 c7 c2 62 a4 7e 82 49 89 f1 48 89 f9 4c 0f 45 d2 48 c7 c7 30 33 80 82 4c 89 da 4c 89 d6 e8 26 30 a9 00 <0f> 0b 48 83 c4 18 c3 48 c7 c6 6b 83 7e 82 49 89 f1 48 89 f0 eb 96
All code
========
0: 80 82 41 51 49 89 c0 addb $0xc0,-0x76b6aebf(%rdx)
7: 49 c7 c2 62 a4 7e 82 mov $0xffffffff827ea462,%r10
e: 49 89 f1 mov %rsi,%r9
11: 48 89 f9 mov %rdi,%rcx
14: 4c 0f 45 d2 cmovne %rdx,%r10
18: 48 c7 c7 30 33 80 82 mov $0xffffffff82803330,%rdi
1f: 4c 89 da mov %r11,%rdx
22: 4c 89 d6 mov %r10,%rsi
25: e8 26 30 a9 00 callq 0xa93050
2a:* 0f 0b ud2 <-- trapping instruction
2c: 48 83 c4 18 add $0x18,%rsp
30: c3 retq
31: 48 c7 c6 6b 83 7e 82 mov $0xffffffff827e836b,%rsi
38: 49 89 f1 mov %rsi,%r9
3b: 48 89 f0 mov %rsi,%rax
3e: eb 96 jmp 0xffffffffffffffd6
Code starting with the faulting instruction
===========================================
0: 0f 0b ud2
2: 48 83 c4 18 add $0x18,%rsp
6: c3 retq
7: 48 c7 c6 6b 83 7e 82 mov $0xffffffff827e836b,%rsi
e: 49 89 f1 mov %rsi,%r9
11: 48 89 f0 mov %rsi,%rax
14: eb 96 jmp 0xffffffffffffffac
[ 386.310020] RSP: 0018:ffffc90009eefe00 EFLAGS: 00010286
[ 386.315422] RAX: 0000000000000000 RBX: 00000000000000e8 RCX: 0000000000000000
[ 386.322820] RDX: 0000000000000001 RSI: ffffffff8123284f RDI: ffffffff8123284f
[ 386.330219] RBP: ffff8888b3318200 R08: 0000000000000001 R09: 0000000000000001
[ 386.337607] R10: 0000000000000001 R11: 0000000000000001 R12: ffff8888b3318118
[ 386.345010] R13: 0000000000000001 R14: 00000000013e4ce0 R15: ffffffff83040260
[ 386.352418] FS: 00007fe185eb6740(0000) GS:ffff8888becc0000(0000) knlGS:0000000000000000
[ 386.360838] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 386.366775] CR2: 00007fb475292000 CR3: 00000008b49d6003 CR4: 00000000003726e0
[ 386.374147] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 386.381532] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 386.388909] Call Trace:
[ 386.391469] __check_object_size (kbuild/src/consumer/mm/usercopy.c:240 kbuild/src/consumer/mm/usercopy.c:286 kbuild/src/consumer/mm/usercopy.c:256)
[ 386.395869] kvm_stats_read (kbuild/src/consumer/include/linux/uaccess.h:200 kbuild/src/consumer/arch/x86/kvm/../../../virt/kvm/kvm_main.c:3546)
[ 386.399875] kvm_vcpu_stats_read (kbuild/src/consumer/arch/x86/kvm/../../../virt/kvm/kvm_main.c:3564)
[ 386.404141] vfs_read (kbuild/src/consumer/fs/read_write.c:494)
[ 386.407514] ksys_pread64 (kbuild/src/consumer/include/linux/file.h:45 kbuild/src/consumer/fs/read_write.c:687)
[ 386.411163] do_syscall_64 (kbuild/src/consumer/arch/x86/entry/common.c:47)
[ 386.414888] entry_SYSCALL_64_after_hwframe (kbuild/src/consumer/arch/x86/entry/entry_64.S:112)
[ 386.420138] RIP: 0033:0x7fe18608bdf4
[ 386.423892] Code: d8 64 89 02 b8 ff ff ff ff eb c5 66 2e 0f 1f 84 00 00 00 00 00 90 8b 05 5a e6 00 00 49 89 ca 85 c0 75 13 b8 11 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 5c c3 0f 1f 00 41 55 49 89 cd 41 54 49 89 d4
All code
========
0: d8 64 89 02 fsubs 0x2(%rcx,%rcx,4)
4: b8 ff ff ff ff mov $0xffffffff,%eax
9: eb c5 jmp 0xffffffffffffffd0
b: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
12: 00 00 00
15: 90 nop
16: 8b 05 5a e6 00 00 mov 0xe65a(%rip),%eax # 0xe676
1c: 49 89 ca mov %rcx,%r10
1f: 85 c0 test %eax,%eax
21: 75 13 jne 0x36
23: b8 11 00 00 00 mov $0x11,%eax
28: 0f 05 syscall
2a:* 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax <-- trapping instruction
30: 77 5c ja 0x8e
32: c3 retq
33: 0f 1f 00 nopl (%rax)
36: 41 55 push %r13
38: 49 89 cd mov %rcx,%r13
3b: 41 54 push %r12
3d: 49 89 d4 mov %rdx,%r12
Code starting with the faulting instruction
===========================================
0: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax
6: 77 5c ja 0x64
8: c3 retq
9: 0f 1f 00 nopl (%rax)
c: 41 55 push %r13
e: 49 89 cd mov %rcx,%r13
11: 41 54 push %r12
13: 49 89 d4 mov %rdx,%r12
[ 386.443313] RSP: 002b:00007fff2f95ffe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000011
[ 386.451151] RAX: ffffffffffffffda RBX: 00000000013e4530 RCX: 00007fe18608bdf4
[ 386.458492] RDX: 00000000000000e8 RSI: 00000000013e4ce0 RDI: 000000000000001d
[ 386.465889] RBP: 00000000000000e8 R08: 000000000040e420 R09: 00000000013e4ca0
[ 386.473294] R10: 0000000000000790 R11: 0000000000000246 R12: 0000000000000040
[ 386.480682] R13: 00000000000000e8 R14: 000000000000001d R15: 00000000013e4ce0
[ 386.488056] irq event stamp: 17487
[ 386.491620] hardirqs last enabled at (17505): _raw_spin_unlock_irq (kbuild/src/consumer/arch/x86/include/asm/irqflags.h:45 kbuild/src/consumer/arch/x86/include/asm/irqflags.h:80 kbuild/src/consumer/include/linux/spinlock_api_smp.h:168 kbuild/src/consumer/kernel/locking/spinlock.c:199)
[ 386.500893] hardirqs last disabled at (17528): __schedule (kbuild/src/consumer/kernel/sched/core.c:5043 (discriminator 1))
[ 386.509429] softirqs last enabled at (17542): __do_softirq (kbuild/src/consumer/arch/x86/include/asm/preempt.h:27 kbuild/src/consumer/kernel/softirq.c:403 kbuild/src/consumer/kernel/softirq.c:588)
[ 386.518160] softirqs last disabled at (17555): irq_exit_rcu (kbuild/src/consumer/kernel/softirq.c:433 kbuild/src/consumer/kernel/softirq.c:637 kbuild/src/consumer/kernel/softirq.c:649)
[ 386.526912] ---[ end trace b50de138b37b26c4 ]---
[ 386.574882] ok 42 selftests: kvm: kvm_binary_stats_test
[ 386.574891]
[ 386.678131] /usr/bin/wget -q --timeout=1800 --tries=1 --local-encoding=UTF-8 http://internal-lkp-server:80/~lkp/cgi-bin/lkp-jobfile-append-var?job_file=/lkp/jobs/scheduled/lkp-skl-nuc2/kernel-selftests-kvm-ucode=0xe2-debian-10.4-x86_64-20200603.cgz-39be2e28180a2e87af5fbb8d83643812e1a3b371-20210616-51116-1ck7oro-2.yaml&job_state=post_run -O /dev/null
[ 386.678141]
[ 388.157966] kill 1098 vmstat --timestamp -n 10
[ 388.157972]
[ 388.170558] kill 1096 dmesg --follow --decode
[ 388.170563]
[ 388.192089] wait for background processes: 1102 1106 meminfo oom-killer
[ 388.192096]
[ 396.520977] /usr/bin/wget -q --timeout=1800 --tries=1 --local-encoding=UTF-8 http://internal-lkp-server:80/~lkp/cgi-bin/lkp-jobfile-append-var?job_file=/lkp/jobs/scheduled/lkp-skl-nuc2/kernel-selftests-kvm-ucode=0xe2-debian-10.4-x86_64-20200603.cgz-39be2e28180a2e87af5fbb8d83643812e1a3b371-20210616-51116-1ck7oro-2.yaml&loadavg=1.54%202.25%201.22%201/158%207007&start_time=1623825809&end_time=1623826124&version=/lkp/lkp/.src-20210615-155142:02c9ed12:7c60d8f6f& -O /dev/null
[ 396.520991]
[ 396.585567] /usr/bin/wget -q --timeout=1800 --tries=1 --local-encoding=UTF-8 http://internal-lkp-server:80/~lkp/cgi-bin/lkp-jobfile-append-var?job_file=/lkp/jobs/scheduled/lkp-skl-nuc2/kernel-selftests-kvm-ucode=0xe2-debian-10.4-x86_64-20200603.cgz-39be2e28180a2e87af5fbb8d83643812e1a3b371-20210616-51116-1ck7oro-2.yaml&job_state=finished -O /dev/null
[ 396.585576]
[ 396.638671] /usr/bin/wget -q --timeout=1800 --tries=1 --local-encoding=UTF-8 http://internal-lkp-server:80/~lkp/cgi-bin/lkp-post-run?job_file=/lkp/jobs/scheduled/lkp-skl-nuc2/kernel-selftests-kvm-ucode=0xe2-debian-10.4-x86_64-20200603.cgz-39be2e28180a2e87af5fbb8d83643812e1a3b371-20210616-51116-1ck7oro-2.yaml -O /dev/null
[ 396.638679]
[ 396.677867] getting new job...
[ 396.677873]
[ 396.699693] /usr/bin/wget -q --timeout=1800 --tries=1 --local-encoding=UTF-8 http://internal-lkp-server:80/~lkp/cgi-bin/gpxelinux.cgi?hostname=lkp-skl-nuc2&mac=82:41:3a:d4:b8:59&last_kernel=/pkg/linux/x86_64-rhel-8.3-kselftests/gcc-9/39be2e28180a2e87af5fbb8d83643812e1a3b371/vmlinuz-5.13.0-rc1-00239-g39be2e28180a&lkp_wtmp -O /tmp/next-job-lkp
[ 396.699702]
[ 398.346941] /usr/bin/wget -q --timeout=1800 --tries=1 --local-encoding=UTF-8 http://internal-lkp-server:80/~lkp//lkp/jobs/scheduled/lkp-skl-nuc2/kernel-selftests-kvm-ucode=0xe2-debian-10.4-x86_64-20200603.cgz-39be2e28180a2e87af5fbb8d83643812e1a3b371-20210616-51116-1ck7oro-5.cgz -O /tmp/next-job.cgz
[ 398.346950]
[ 398.355973] 24 blocks
[ 398.380914]
[ 398.405028] /usr/bin/wget -q --timeout=1800 --tries=1 --local-encoding=UTF-8 http://internal-lkp-server:80/~lkp/cgi-bin/lkp-wtmp?tbox_name=lkp-skl-nuc2&tbox_state=kexec_to_next_job -O /dev/null
[ 398.405042]
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 split-job --compatible job.yaml # generate the yaml file for lkp run
bin/lkp run generated-yaml-file
---
0DAY/LKP+ Test Infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/[email protected] Intel Corporation
Thanks,
Oliver Sang