syzbot


KCSAN: data-race in kvm_arch_vcpu_create / pvclock_gtod_notify

Status: closed as invalid on 2019/11/19 13:44
Subsystems: kvm
[Documentation on labels]
First crash: 1643d, last: 1641d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in kvm_arch_vcpu_create / pvclock_gtod_notify

write to 0xffffffff85fdd628 of 4 bytes by interrupt on cpu 0:
 update_pvclock_gtod arch/x86/kvm/x86.c:1552 [inline]
 pvclock_gtod_notify+0xa4/0x260 arch/x86/kvm/x86.c:7126
 notifier_call_chain+0xd7/0x160 kernel/notifier.c:95
 __raw_notifier_call_chain kernel/notifier.c:396 [inline]
 raw_notifier_call_chain+0x37/0x50 kernel/notifier.c:403
 update_pvclock_gtod kernel/time/timekeeping.c:578 [inline]
 timekeeping_update+0x1b5/0x2d0 kernel/time/timekeeping.c:672
 timekeeping_advance+0x882/0xd80 kernel/time/timekeeping.c:2120
 update_wall_time+0x19/0x20 kernel/time/timekeeping.c:2137
 tick_do_update_jiffies64+0x1ae/0x260 kernel/time/tick-sched.c:94
 tick_sched_do_timer+0xd4/0xe0 kernel/time/tick-sched.c:138
 tick_sched_timer+0x43/0xe0 kernel/time/tick-sched.c:1292
 __run_hrtimer kernel/time/hrtimer.c:1514 [inline]
 __hrtimer_run_queues+0x288/0x600 kernel/time/hrtimer.c:1576
 hrtimer_interrupt+0x22a/0x480 kernel/time/hrtimer.c:1638
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1110 [inline]
 smp_apic_timer_interrupt+0xdc/0x280 arch/x86/kernel/apic/apic.c:1135
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830
 arch_local_irq_restore arch/x86/include/asm/paravirt.h:756 [inline]
 __kcsan_setup_watchpoint+0x268/0x4a0 kernel/kcsan/core.c:424

read to 0xffffffff85fdd628 of 4 bytes by task 10398 on cpu 1:
 kvm_check_tsc_unstable arch/x86/kvm/x86.c:1838 [inline]
 kvm_arch_vcpu_create+0x3c/0x130 arch/x86/kvm/x86.c:9032
 kvm_vm_ioctl_create_vcpu arch/x86/kvm/../../../virt/kvm/kvm_main.c:2653 [inline]
 kvm_vm_ioctl+0x40b/0x1190 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3205
 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

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 10398 Comm: syz-executor.5 Not tainted 5.4.0-rc3+ #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/10/26 21:15 https://github.com/google/ktsan.git kcsan 05f2236801fe 25bb509e .config console log report ci2-upstream-kcsan-gce
2019/10/24 18:00 https://github.com/google/ktsan.git kcsan 05f2236801fe d01bb02a .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.