syzbot


KCSAN: data-race in direct_page_fault / kvm_mmu_notifier_invalidate_range_end (3)

Status: auto-closed as invalid on 2021/05/17 12:39
Subsystems: kvm
[Documentation on labels]
First crash: 1103d, last: 1081d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in direct_page_fault / kvm_mmu_notifier_invalidate_range_end kvm 10 1379d 1488d 0/26 closed as invalid on 2020/06/18 14:24
upstream KCSAN: data-race in direct_page_fault / kvm_mmu_notifier_invalidate_range_end (2) kvm 42 1143d 1208d 0/26 auto-closed as invalid on 2021/03/16 01:35

Sample crash report:
==================================================================
BUG: KCSAN: data-race in direct_page_fault / kvm_mmu_notifier_invalidate_range_end

write to 0xffffc90003d4a070 of 8 bytes by task 20195 on cpu 0:
 kvm_mmu_notifier_invalidate_range_end+0x39/0xa0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:530
 mn_hlist_invalidate_end mm/mmu_notifier.c:583 [inline]
 __mmu_notifier_invalidate_range_end+0x18e/0x210 mm/mmu_notifier.c:603
 mmu_notifier_invalidate_range_end include/linux/mmu_notifier.h:479 [inline]
 change_pmd_range mm/mprotect.c:277 [inline]
 change_pud_range mm/mprotect.c:297 [inline]
 change_p4d_range mm/mprotect.c:317 [inline]
 change_protection_range mm/mprotect.c:342 [inline]
 change_protection+0x10b3/0x12f0 mm/mprotect.c:365
 mprotect_fixup+0x377/0x580 mm/mprotect.c:487
 do_mprotect_pkey+0x543/0x6f0 mm/mprotect.c:626
 __do_sys_mprotect mm/mprotect.c:652 [inline]
 __se_sys_mprotect mm/mprotect.c:649 [inline]
 __x64_sys_mprotect+0x44/0x50 mm/mprotect.c:649
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffffc90003d4a070 of 8 bytes by task 20199 on cpu 1:
 direct_page_fault+0x27f/0xc00 arch/x86/kvm/mmu/mmu.c:3709
 kvm_tdp_page_fault+0x92/0xa0 arch/x86/kvm/mmu/mmu.c:3806
 kvm_mmu_do_page_fault arch/x86/kvm/mmu.h:119 [inline]
 kvm_mmu_page_fault+0xca/0x3c0 arch/x86/kvm/mmu/mmu.c:5021
 handle_ept_violation+0x280/0x360 arch/x86/kvm/vmx/vmx.c:5380
 __vmx_handle_exit+0x35b/0x850 arch/x86/kvm/vmx/vmx.c:6090
 vmx_handle_exit+0x1a/0xd0 arch/x86/kvm/vmx/vmx.c:6107
 vcpu_enter_guest+0x1adf/0x2710 arch/x86/kvm/x86.c:9231
 vcpu_run+0x24f/0x6a0 arch/x86/kvm/x86.c:9297
 kvm_arch_vcpu_ioctl_run+0x476/0x860 arch/x86/kvm/x86.c:9525
 kvm_vcpu_ioctl+0x562/0x8f0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3316
 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/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 20199 Comm: syz-executor.0 Tainted: G        W         5.12.0-rc7-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
2021/04/12 12:34 upstream d434405aaab7 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in direct_page_fault / kvm_mmu_notifier_invalidate_range_end
2021/04/07 12:42 upstream 2d743660786e 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in direct_page_fault / kvm_mmu_notifier_invalidate_range_end
2021/03/31 23:09 upstream d19cc4bfbff1 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in direct_page_fault / kvm_mmu_notifier_invalidate_range_end
2021/03/22 21:38 upstream 0d02ec6b3136 8092f30d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in direct_page_fault / kvm_mmu_notifier_invalidate_range_end
2021/03/20 23:20 upstream 812da4d39463 17810eae .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in direct_page_fault / kvm_mmu_notifier_invalidate_range_end
* Struck through repros no longer work on HEAD.