syzbot


KCSAN: data-race in kvm_set_memslot / mark_mmio_spte

Status: auto-closed as invalid on 2020/08/05 14:26
Subsystems: kvm
[Documentation on labels]
First crash: 1374d, last: 1366d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in kvm_set_memslot / mark_mmio_spte (2) kvm 5 1270d 1316d 0/26 auto-closed as invalid on 2020/11/10 01:04

Sample crash report:
==================================================================
BUG: KCSAN: data-race in kvm_set_memslot / mark_mmio_spte

write to 0xffff88809f350000 of 8 bytes by task 29856 on cpu 1:
 install_new_memslots arch/x86/kvm/../../../virt/kvm/kvm_main.c:1092 [inline]
 kvm_set_memslot+0x866/0x910 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1168
 __kvm_set_memory_region+0x708/0x910 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1314
 kvm_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1335 [inline]
 kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1347 [inline]
 kvm_vm_ioctl+0x81d/0x17c0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3639
 vfs_ioctl fs/ioctl.c:48 [inline]
 ksys_ioctl fs/ioctl.c:753 [inline]
 __do_sys_ioctl fs/ioctl.c:762 [inline]
 __se_sys_ioctl+0xc9/0x130 fs/ioctl.c:760
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:760
 do_syscall_64+0x51/0xb0 arch/x86/entry/common.c:359
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88809f350000 of 8 bytes by task 29846 on cpu 0:
 make_mmio_spte arch/x86/kvm/mmu/mmu.c:452 [inline]
 mark_mmio_spte+0x60/0x230 arch/x86/kvm/mmu/mmu.c:468
 set_mmio_spte arch/x86/kvm/mmu/mmu.c:496 [inline]
 set_spte+0x629/0x630 arch/x86/kvm/mmu/mmu.c:2999
 mmu_set_spte+0x160/0xa00 arch/x86/kvm/mmu/mmu.c:3117
 __direct_map+0x633/0x950 arch/x86/kvm/mmu/mmu.c:3365
 direct_page_fault+0x314/0x670 arch/x86/kvm/mmu/mmu.c:4136
 kvm_tdp_page_fault+0x92/0xa0 arch/x86/kvm/mmu/mmu.c:4208
 kvm_mmu_do_page_fault arch/x86/kvm/mmu.h:115 [inline]
 kvm_mmu_page_fault+0xca/0x410 arch/x86/kvm/mmu/mmu.c:5422
 handle_ept_misconfig+0x99/0x230 arch/x86/kvm/vmx/vmx.c:5332
 vmx_handle_exit+0x58b/0xb90 arch/x86/kvm/vmx/vmx.c:6093
 vcpu_enter_guest+0x1ca9/0x2760 arch/x86/kvm/x86.c:8594
 vcpu_run+0x27e/0x790 arch/x86/kvm/x86.c:8659
 kvm_arch_vcpu_ioctl_run+0x38d/0x6a0 arch/x86/kvm/x86.c:8880
 kvm_vcpu_ioctl+0x565/0x950 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3166
 vfs_ioctl fs/ioctl.c:48 [inline]
 ksys_ioctl fs/ioctl.c:753 [inline]
 __do_sys_ioctl fs/ioctl.c:762 [inline]
 __se_sys_ioctl+0xc9/0x130 fs/ioctl.c:760
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:760
 do_syscall_64+0x51/0xb0 arch/x86/entry/common.c:359
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 29846 Comm: syz-executor.5 Not tainted 5.8.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/01 14:25 upstream 7c30b859a947 39acb39d .config console log report ci2-upstream-kcsan-gce
2020/06/23 20:30 upstream 3e08a95294a4 6930bbef .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.