lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220127023015.GA34140@xsang-OptiPlex-9020>
Date:   Thu, 27 Jan 2022 10:30:15 +0800
From:   kernel test robot <oliver.sang@...el.com>
To:     David Woodhouse <dwmw@...zon.co.uk>
Cc:     Paolo Bonzini <pbonzini@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>, lkp@...ts.01.org,
        lkp@...el.com
Subject: [KVM]  2efd61a608:
 WARNING:at_arch/x86/kvm/../../../virt/kvm/kvm_main.c:#mark_page_dirty_in_slot



Greeting,

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

commit: 2efd61a608b0039911924d2e5d7028eb37496e85 ("KVM: Warn if mark_page_dirty() is called without an active vCPU")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master

in testcase: kernel-selftests
version: kernel-selftests-x86_64-db530529-1_20220124
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-6700 CPU @ 3.40GHz with 28G 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 <oliver.sang@...el.com>


[ 123.741578][ T9801] WARNING: CPU: 2 PID: 9801 at arch/x86/kvm/../../../virt/kvm/kvm_main.c:3160 mark_page_dirty_in_slot (arch/x86/kvm/../../../virt/kvm/kvm_main.c:3160 (discriminator 1)) 
[  123.753541][ T9801] Modules linked in: btrfs blake2b_generic xor raid6_pq zstd_compress intel_rapl_msr libcrc32c intel_rapl_common sd_mod t10_pi sg ipmi_devintf i915 ipmi_msghandler x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel mei_wdt intel_gtt ttm rapl wmi_bmof intel_cstate drm_kms_helper ahci syscopyarea libahci mei_me sysfillrect intel_uncore sysimgblt libata i2c_i801 mei i2c_smbus intel_pch_thermal fb_sys_fops wmi video intel_pmc_core acpi_pad ip_tables
[  123.800234][ T9801] CPU: 2 PID: 9801 Comm: hyperv_clock Not tainted 5.16.0-rc4-00328-g2efd61a608b0 #1
[  123.809567][ T9801] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.2.8 01/26/2016
[ 123.817787][ T9801] RIP: 0010:mark_page_dirty_in_slot (arch/x86/kvm/../../../virt/kvm/kvm_main.c:3160 (discriminator 1)) 
[ 123.823970][ T9801] Code: 08 00 00 00 48 85 db 48 8d 43 3f 48 0f 49 c3 48 c1 f8 06 48 8d 7c c5 00 e8 77 96 ad 00 f0 48 0f ab 5d 00 48 83 c4 10 5b 5d c3 <0f> 0b 48 83 c4 10 5b 5d c3 0f 0b eb ec 48 89 54 24 08 48 89 34 24
All code
========
   0:	08 00                	or     %al,(%rax)
   2:	00 00                	add    %al,(%rax)
   4:	48 85 db             	test   %rbx,%rbx
   7:	48 8d 43 3f          	lea    0x3f(%rbx),%rax
   b:	48 0f 49 c3          	cmovns %rbx,%rax
   f:	48 c1 f8 06          	sar    $0x6,%rax
  13:	48 8d 7c c5 00       	lea    0x0(%rbp,%rax,8),%rdi
  18:	e8 77 96 ad 00       	callq  0xad9694
  1d:	f0 48 0f ab 5d 00    	lock bts %rbx,0x0(%rbp)
  23:	48 83 c4 10          	add    $0x10,%rsp
  27:	5b                   	pop    %rbx
  28:	5d                   	pop    %rbp
  29:	c3                   	retq   
  2a:*	0f 0b                	ud2    		<-- trapping instruction
  2c:	48 83 c4 10          	add    $0x10,%rsp
  30:	5b                   	pop    %rbx
  31:	5d                   	pop    %rbp
  32:	c3                   	retq   
  33:	0f 0b                	ud2    
  35:	eb ec                	jmp    0x23
  37:	48 89 54 24 08       	mov    %rdx,0x8(%rsp)
  3c:	48 89 34 24          	mov    %rsi,(%rsp)

Code starting with the faulting instruction
===========================================
   0:	0f 0b                	ud2    
   2:	48 83 c4 10          	add    $0x10,%rsp
   6:	5b                   	pop    %rbx
   7:	5d                   	pop    %rbp
   8:	c3                   	retq   
   9:	0f 0b                	ud2    
   b:	eb ec                	jmp    0xfffffffffffffff9
   d:	48 89 54 24 08       	mov    %rdx,0x8(%rsp)
  12:	48 89 34 24          	mov    %rsi,(%rsp)
[  123.844024][ T9801] RSP: 0018:ffffc9000b49f880 EFLAGS: 00010246
[  123.850038][ T9801] RAX: 0000000000000000 RBX: ffffc9000b4be3a8 RCX: 0000000000000000
[  123.858004][ T9801] RDX: 0000000000000023 RSI: ffff88874e702400 RDI: ffffc9000b4a1000
[  123.865934][ T9801] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000004
[  123.873870][ T9801] R10: ffffc9000b4be3ab R11: fffff52001697c75 R12: 0000000000000023
[  123.881802][ T9801] R13: ffffc9000b4a1000 R14: 0000000000000004 R15: 00007f0fd89a4000
[  123.889734][ T9801] FS:  00007f0fd8b88740(0000) GS:ffff88860f100000(0000) knlGS:0000000000000000
[  123.898641][ T9801] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  123.905186][ T9801] CR2: 0000000000000000 CR3: 00000001584de004 CR4: 00000000003726e0
[  123.913131][ T9801] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  123.921060][ T9801] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  123.929036][ T9801] Call Trace:
[  123.932257][ T9801]  <TASK>
[ 123.935134][ T9801] __kvm_write_guest_page (arch/x86/kvm/../../../virt/kvm/kvm_main.c:2947) 
[ 123.940399][ T9801] kvm_write_guest (arch/x86/kvm/../../../virt/kvm/kvm_main.c:2978) 
[ 123.944953][ T9801] kvm_hv_invalidate_tsc_page (arch/x86/kvm/hyperv.c:1220) 
[ 123.950615][ T9801] ? kvm_hv_invalidate_tsc_page (arch/x86/kvm/hyperv.c:1213) 
[ 123.956501][ T9801] kvm_arch_vm_ioctl (arch/x86/kvm/x86.c:2815 arch/x86/kvm/x86.c:2826 arch/x86/kvm/x86.c:6041 arch/x86/kvm/x86.c:6315) 
[ 123.961480][ T9801] ? kvm_arch_pm_notifier (arch/x86/kvm/x86.c:6072) 
[ 123.966863][ T9801] ? __lock_acquire (arch/x86/include/asm/bitops.h:214 (discriminator 9) include/asm-generic/bitops/instrumented-non-atomic.h:135 (discriminator 9) kernel/locking/lockdep.c:199 (discriminator 9) kernel/locking/lockdep.c:5024 (discriminator 9)) 
[ 123.971721][ T9801] ? check_irq_usage (include/asm-generic/bitops/instrumented-non-atomic.h:134 kernel/locking/lockdep.c:199 kernel/locking/lockdep.c:1634 kernel/locking/lockdep.c:2771) 
[ 123.976620][ T9801] ? kvm_vcpu_ioctl (arch/x86/kvm/../../../virt/kvm/kvm_main.c:4065) 
[ 123.981422][ T9801] ? rcu_read_lock_sched_held (include/linux/lockdep.h:283 kernel/rcu/update.c:125) 
[ 123.987028][ T9801] ? rcu_read_lock_bh_held (kernel/rcu/update.c:120) 
[ 123.992271][ T9801] ? kvm_arch_vcpu_put (include/linux/srcu.h:189 arch/x86/kvm/x86.c:4483) 
[ 123.997323][ T9801] ? find_held_lock (kernel/locking/lockdep.c:5130) 
[ 124.002037][ T9801] ? kvm_vcpu_ioctl (arch/x86/kvm/../../../virt/kvm/kvm_main.c:4065) 
[ 124.006846][ T9801] ? lock_release (kernel/locking/lockdep.c:5315 kernel/locking/lockdep.c:5657) 
[ 124.011486][ T9801] ? lock_downgrade (kernel/locking/lockdep.c:5645) 
[ 124.016295][ T9801] kvm_vm_ioctl (arch/x86/kvm/../../../virt/kvm/kvm_main.c:4648) 
[ 124.020852][ T9801] ? kvm_arch_vcpu_ioctl_run (include/linux/srcu.h:189 arch/x86/kvm/x86.c:9074 arch/x86/kvm/x86.c:10309) 
[ 124.026546][ T9801] ? kvm_unregister_device_ops (arch/x86/kvm/../../../virt/kvm/kvm_main.c:4461) 
[ 124.032129][ T9801] ? __mutex_unlock_slowpath (arch/x86/include/asm/atomic64_64.h:190 include/linux/atomic/atomic-long.h:449 include/linux/atomic/atomic-instrumented.h:1677 kernel/locking/mutex.c:917) 
[ 124.037740][ T9801] ? rcu_read_lock_sched_held (include/linux/lockdep.h:283 kernel/rcu/update.c:125) 
[ 124.043309][ T9801] ? rcu_read_lock_bh_held (kernel/rcu/update.c:120) 
[ 124.048582][ T9801] ? rcu_read_lock_bh_held (kernel/rcu/update.c:120) 
[ 124.053817][ T9801] ? fiemap_prep (fs/ioctl.c:778) 
[ 124.058365][ T9801] ? kvm_vcpu_ioctl (arch/x86/kvm/../../../virt/kvm/kvm_main.c:3861) 
[ 124.063157][ T9801] ? kvm_vcpu_kick (arch/x86/kvm/../../../virt/kvm/kvm_main.c:3861) 
[ 124.067904][ T9801] ? kvm_vcpu_kick (arch/x86/kvm/../../../virt/kvm/kvm_main.c:3861) 
[ 124.072618][ T9801] ? kvm_vcpu_kick (arch/x86/kvm/../../../virt/kvm/kvm_main.c:3861) 
[ 124.077352][ T9801] ? kvm_vcpu_kick (arch/x86/kvm/../../../virt/kvm/kvm_main.c:3861) 
[ 124.082073][ T9801] ? syscall_exit_to_user_mode (kernel/entry/common.c:127 kernel/entry/common.c:302) 
[ 124.087696][ T9801] ? syscall_enter_from_user_mode (kernel/entry/common.c:107) 
[ 124.093550][ T9801] ? rcu_read_lock_sched_held (include/linux/lockdep.h:283 kernel/rcu/update.c:125) 
[ 124.099155][ T9801] ? rcu_read_lock_bh_held (kernel/rcu/update.c:120) 
[ 124.104402][ T9801] __x64_sys_ioctl (fs/ioctl.c:52 fs/ioctl.c:874 fs/ioctl.c:860 fs/ioctl.c:860) 
[ 124.109104][ T9801] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) 
[ 124.113504][ T9801] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4232 kernel/locking/lockdep.c:4292 kernel/locking/lockdep.c:4244) 
[ 124.119441][ T9801] ? do_syscall_64 (arch/x86/entry/common.c:87) 
[ 124.124014][ T9801] ? do_syscall_64 (arch/x86/entry/common.c:87) 
[ 124.128534][ T9801] ? do_syscall_64 (arch/x86/entry/common.c:87) 
[ 124.133074][ T9801] ? do_syscall_64 (arch/x86/entry/common.c:87) 
[ 124.137620][ T9801] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4232 kernel/locking/lockdep.c:4292 kernel/locking/lockdep.c:4244) 
[ 124.143560][ T9801] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113) 
[  124.149419][ T9801] RIP: 0033:0x7f0fd8c7b427
[ 124.153795][ T9801] 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
All code
========
   0:	00 00                	add    %al,(%rax)
   2:	90                   	nop
   3:	48 8b 05 69 aa 0c 00 	mov    0xcaa69(%rip),%rax        # 0xcaa73
   a:	64 c7 00 26 00 00 00 	movl   $0x26,%fs:(%rax)
  11:	48 c7 c0 ff ff ff ff 	mov    $0xffffffffffffffff,%rax
  18:	c3                   	retq   
  19:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
  20:	00 00 00 
  23:	b8 10 00 00 00       	mov    $0x10,%eax
  28:	0f 05                	syscall 
  2a:*	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax		<-- trapping instruction
  30:	73 01                	jae    0x33
  32:	c3                   	retq   
  33:	48 8b 0d 39 aa 0c 00 	mov    0xcaa39(%rip),%rcx        # 0xcaa73
  3a:	f7 d8                	neg    %eax
  3c:	64 89 01             	mov    %eax,%fs:(%rcx)
  3f:	48                   	rex.W

Code starting with the faulting instruction
===========================================
   0:	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax
   6:	73 01                	jae    0x9
   8:	c3                   	retq   
   9:	48 8b 0d 39 aa 0c 00 	mov    0xcaa39(%rip),%rcx        # 0xcaa49
  10:	f7 d8                	neg    %eax
  12:	64 89 01             	mov    %eax,%fs:(%rcx)
  15:	48                   	rex.W


To reproduce:

        git clone https://github.com/intel/lkp-tests.git
        cd lkp-tests
        sudo 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
        sudo bin/lkp run generated-yaml-file

        # if come across any failure that blocks the test,
        # please remove ~/.lkp and /lkp dir to run from a clean state.



---
0DAY/LKP+ Test Infrastructure                   Open Source Technology Center
https://lists.01.org/hyperkitty/list/lkp@lists.01.org       Intel Corporation

Thanks,
Oliver Sang


View attachment "config-5.16.0-rc4-00328-g2efd61a608b0" of type "text/plain" (177336 bytes)

View attachment "job-script" of type "text/plain" (5844 bytes)

Download attachment "dmesg.xz" of type "application/x-xz" (37176 bytes)

View attachment "kernel-selftests" of type "text/plain" (96956 bytes)

View attachment "job.yaml" of type "text/plain" (4875 bytes)

View attachment "reproduce" of type "text/plain" (146 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ