syzbot


KCSAN: data-race in kvm_set_memslot / mark_mmio_spte (2)

Status: auto-closed as invalid on 2020/11/10 01:04
Subsystems: kvm
[Documentation on labels]
First crash: 1344d, last: 1297d
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 kvm 2 1393d 1401d 0/26 auto-closed as invalid on 2020/08/05 14:26

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

write to 0xffff888083e5e800 of 8 bytes by task 29162 on cpu 1:
 install_new_memslots arch/x86/kvm/../../../virt/kvm/kvm_main.c:1148 [inline]
 kvm_set_memslot+0x866/0x910 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1224
 __kvm_set_memory_region+0x708/0x910 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1370
 kvm_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1391 [inline]
 kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1403 [inline]
 kvm_vm_ioctl+0x81d/0x17c0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3704
 vfs_ioctl fs/ioctl.c:48 [inline]
 __do_sys_ioctl fs/ioctl.c:753 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:739
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:739
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888083e5e800 of 8 bytes by task 29158 on cpu 0:
 make_mmio_spte arch/x86/kvm/mmu/mmu.c:454 [inline]
 mark_mmio_spte+0x60/0x230 arch/x86/kvm/mmu/mmu.c:470
 set_mmio_spte arch/x86/kvm/mmu/mmu.c:498 [inline]
 set_spte+0x629/0x630 arch/x86/kvm/mmu/mmu.c:2983
 mmu_set_spte+0x15b/0xba0 arch/x86/kvm/mmu/mmu.c:3101
 __direct_map+0x61a/0x990 arch/x86/kvm/mmu/mmu.c:3349
 direct_page_fault+0x372/0x740 arch/x86/kvm/mmu/mmu.c:4121
 kvm_tdp_page_fault+0x92/0xa0 arch/x86/kvm/mmu/mmu.c:4188
 kvm_mmu_do_page_fault arch/x86/kvm/mmu.h:112 [inline]
 kvm_mmu_page_fault+0xca/0x410 arch/x86/kvm/mmu/mmu.c:5451
 handle_ept_misconfig+0x99/0x230 arch/x86/kvm/vmx/vmx.c:5361
 vmx_handle_exit+0x558/0xc30 arch/x86/kvm/vmx/vmx.c:6125
 vcpu_enter_guest+0x1ada/0x2660 arch/x86/kvm/x86.c:8655
 vcpu_run+0x26e/0x740 arch/x86/kvm/x86.c:8720
 kvm_arch_vcpu_ioctl_run+0x38d/0x6a0 arch/x86/kvm/x86.c:8937
 kvm_vcpu_ioctl+0x565/0x950 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3230
 vfs_ioctl fs/ioctl.c:48 [inline]
 __do_sys_ioctl fs/ioctl.c:753 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:739
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:739
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 29158 Comm: syz-executor.1 Not tainted 5.9.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/10/06 01:04 upstream 7575fdda569b 1880b4a9 .config console log report info ci2-upstream-kcsan-gce
2020/09/05 18:46 upstream 9322c47b21b9 abf9ba4f .config console log report ci2-upstream-kcsan-gce
2020/08/24 12:26 upstream d012a7190fc1 67b599d1 .config console log report ci2-upstream-kcsan-gce
2020/08/20 17:46 upstream 7eac66d0456f ed282a3a .config console log report ci2-upstream-kcsan-gce
2020/08/20 04:59 upstream 18445bf405cb ed282a3a .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.