syzbot


KCSAN: data-race in emulator_read_write_onepage / install_new_memslots

Status: auto-closed as invalid on 2020/02/23 22:37
Subsystems: kvm
[Documentation on labels]
First crash: 1620d, last: 1607d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in emulator_read_write_onepage / install_new_memslots (2) kvm 2 1431d 1455d 0/26 closed as invalid on 2020/06/18 14:13

Sample crash report:
==================================================================
BUG: KCSAN: data-race in emulator_read_write_onepage / install_new_memslots

write to 0xffff88809f7e0000 of 8 bytes by task 12907 on cpu 0:
 install_new_memslots+0xef/0x130 arch/x86/kvm/../../../virt/kvm/kvm_main.c:984
 __kvm_set_memory_region+0xeea/0x1380 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1143
 kvm_set_memory_region+0x36/0x60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1166
 kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1178 [inline]
 kvm_vm_ioctl+0x6f8/0x12e0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3306
 vfs_ioctl fs/ioctl.c:47 [inline]
 file_ioctl fs/ioctl.c:545 [inline]
 do_vfs_ioctl+0x84f/0xcf0 fs/ioctl.c:732
 ksys_ioctl+0xbd/0xe0 fs/ioctl.c:749
 __do_sys_ioctl fs/ioctl.c:756 [inline]
 __se_sys_ioctl fs/ioctl.c:754 [inline]
 __x64_sys_ioctl+0x4c/0x60 fs/ioctl.c:754
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88809f7e0000 of 8 bytes by task 12913 on cpu 1:
 vcpu_match_mmio_gen arch/x86/kvm/x86.h:206 [inline]
 vcpu_match_mmio_gva arch/x86/kvm/x86.h:225 [inline]
 vcpu_mmio_gva_to_gpa arch/x86/kvm/x86.c:5540 [inline]
 emulator_read_write_onepage+0x1dc/0x750 arch/x86/kvm/x86.c:5666
 emulator_read_write+0x178/0x330 arch/x86/kvm/x86.c:5726
 emulator_read_emulated+0x45/0x60 arch/x86/kvm/x86.c:5753
 read_emulated arch/x86/kvm/emulate.c:1424 [inline]
 segmented_read+0x170/0x220 arch/x86/kvm/emulate.c:1448
 x86_emulate_insn+0x12f8/0x28e0 arch/x86/kvm/emulate.c:5616
 x86_emulate_instruction+0x498/0x1120 arch/x86/kvm/x86.c:6741
 kvm_mmu_page_fault+0x233/0xbc0 arch/x86/kvm/mmu/mmu.c:5589
 handle_ept_violation+0x1e5/0x340 arch/x86/kvm/vmx/vmx.c:5163
 vmx_handle_exit+0x1c2/0xdb0 arch/x86/kvm/vmx/vmx.c:5921
 vcpu_enter_guest+0xc25/0x3860 arch/x86/kvm/x86.c:8290
 vcpu_run arch/x86/kvm/x86.c:8354 [inline]
 kvm_arch_vcpu_ioctl_run+0x2a8/0xdf0 arch/x86/kvm/x86.c:8561
 kvm_vcpu_ioctl+0x758/0xa30 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2847
 vfs_ioctl fs/ioctl.c:47 [inline]
 file_ioctl fs/ioctl.c:545 [inline]
 do_vfs_ioctl+0x84f/0xcf0 fs/ioctl.c:732
 ksys_ioctl+0xbd/0xe0 fs/ioctl.c:749
 __do_sys_ioctl fs/ioctl.c:756 [inline]
 __se_sys_ioctl fs/ioctl.c:754 [inline]
 __x64_sys_ioctl+0x4c/0x60 fs/ioctl.c:754
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 12913 Comm: syz-executor.3 Not tainted 5.5.0-rc1-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
2019/12/15 22:37 https://github.com/google/ktsan.git kcsan 245a43005292 eef6e580 .config console log report ci2-upstream-kcsan-gce
2019/12/03 00:04 https://github.com/google/ktsan.git kcsan ef798c30ba4e ab342da3 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.