syzbot


KCSAN: data-race in install_new_memslots / vcpu_is_mmio_gpa.part.0

Status: closed as invalid on 2019/11/19 13:44
Subsystems: kvm
[Documentation on labels]
First crash: 1656d, last: 1655d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in install_new_memslots / vcpu_is_mmio_gpa.part.0 (2) kvm 6 1442d 1630d 0/26 closed as invalid on 2020/06/18 14:24

Sample crash report:
==================================================================
BUG: KCSAN: data-race in install_new_memslots / vcpu_is_mmio_gpa.part.0

write to 0xffff8880bb340000 of 8 bytes by task 22277 on cpu 0:
 install_new_memslots+0xef/0x130 arch/x86/kvm/../../../virt/kvm/kvm_main.c:906
 __kvm_set_memory_region+0xeea/0x1380 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1065
 kvm_set_memory_region+0x36/0x60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1088
 kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1100 [inline]
 kvm_vm_ioctl+0x6d0/0x1190 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3224
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:509 [inline]
 do_vfs_ioctl+0x991/0xc60 fs/ioctl.c:696
 ksys_ioctl+0xbd/0xe0 fs/ioctl.c:713
 __do_sys_ioctl fs/ioctl.c:720 [inline]
 __se_sys_ioctl fs/ioctl.c:718 [inline]
 __x64_sys_ioctl+0x4c/0x60 fs/ioctl.c:718
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880bb340000 of 8 bytes by task 22280 on cpu 1:
 vcpu_match_mmio_gen arch/x86/kvm/x86.h:206 [inline]
 vcpu_match_mmio_gpa arch/x86/kvm/x86.h:234 [inline]
 vcpu_is_mmio_gpa.part.0+0x8a/0x220 arch/x86/kvm/x86.c:5472
 vcpu_is_mmio_gpa arch/x86/kvm/x86.c:5469 [inline]
 vcpu_mmio_gva_to_gpa arch/x86/kvm/x86.c:5506 [inline]
 emulator_read_write_onepage+0x288/0x750 arch/x86/kvm/x86.c:5618
 emulator_read_write+0x178/0x330 arch/x86/kvm/x86.c:5678
 emulator_write_emulated+0x45/0x60 arch/x86/kvm/x86.c:5715
 segmented_write+0xa2/0xe0 arch/x86/kvm/emulate.c:1462
 writeback arch/x86/kvm/emulate.c:1824 [inline]
 writeback+0x246/0x440 arch/x86/kvm/emulate.c:1810
 x86_emulate_insn+0x1429/0x28e0 arch/x86/kvm/emulate.c:5734
 x86_emulate_instruction+0x498/0x11f0 arch/x86/kvm/x86.c:6693
 kvm_mmu_page_fault+0x233/0xbc0 arch/x86/kvm/mmu.c:5489
 handle_ept_violation+0x1e5/0x340 arch/x86/kvm/vmx/vmx.c:5193
 vmx_handle_exit+0x1c2/0xd60 arch/x86/kvm/vmx/vmx.c:5949
 vcpu_enter_guest+0xc1f/0x3820 arch/x86/kvm/x86.c:8226
 vcpu_run arch/x86/kvm/x86.c:8290 [inline]
 kvm_arch_vcpu_ioctl_run+0x2a2/0xdc0 arch/x86/kvm/x86.c:8497

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 22280 Comm: syz-executor.2 Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/10/29 05:14 https://github.com/google/ktsan.git kcsan 05f2236801fe 5ea87a66 .config console log report ci2-upstream-kcsan-gce
2019/10/28 23:15 https://github.com/google/ktsan.git kcsan 05f2236801fe 439d7b14 .config console log report ci2-upstream-kcsan-gce
2019/10/28 08:13 https://github.com/google/ktsan.git kcsan 05f2236801fe 25bb509e .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.