syzbot


KCSAN: data-race in perf_event_set_state / perf_event_update_userpage

Status: auto-obsoleted due to no activity on 2024/04/09 11:19
Subsystems: perf
[Documentation on labels]
Reported-by: syzbot+2c739cbfe7a7fa3f02ef@syzkaller.appspotmail.com
First crash: 46d, last: 46d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in perf_event_set_state / perf_event_update_userpage

write to 0xffff88814212c4f8 of 8 bytes by task 533 on cpu 0:
 perf_event_update_time kernel/events/core.c:641 [inline]
 perf_event_set_state+0x1a1/0x3f0 kernel/events/core.c:660
 event_sched_out+0x421/0x5f0 kernel/events/core.c:2301
 group_sched_out kernel/events/core.c:2323 [inline]
 __pmu_ctx_sched_out+0x386/0x4a0 kernel/events/core.c:3268
 ctx_sched_out+0x2b1/0x310 kernel/events/core.c:3337
 task_ctx_sched_out kernel/events/core.c:2669 [inline]
 ctx_resched+0x1e0/0x3e0 kernel/events/core.c:2721
 __perf_install_in_context+0x323/0x380 kernel/events/core.c:2807
 remote_function+0x9a/0xb0 kernel/events/core.c:92
 csd_do_func kernel/smp.c:133 [inline]
 generic_exec_single+0xc9/0x390 kernel/smp.c:404
 smp_call_function_single+0x15c/0x2e0 kernel/smp.c:647
 task_function_call kernel/events/core.c:120 [inline]
 perf_install_in_context+0x2f1/0x460 kernel/events/core.c:2909
 __do_sys_perf_event_open kernel/events/core.c:12768 [inline]
 __se_sys_perf_event_open+0x1f62/0x2170 kernel/events/core.c:12420
 __x64_sys_perf_event_open+0x67/0x80 kernel/events/core.c:12420
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff88814212c4f8 of 8 bytes by task 534 on cpu 1:
 __perf_update_times kernel/events/core.c:632 [inline]
 calc_timer_values kernel/events/core.c:4550 [inline]
 perf_event_update_userpage+0x1f5/0x450 kernel/events/core.c:6124
 perf_mmap+0xa46/0xcb0 kernel/events/core.c:6620
 call_mmap include/linux/fs.h:2092 [inline]
 mmap_region+0x9a6/0x1640 mm/mmap.c:2821
 do_mmap+0x6a5/0xab0 mm/mmap.c:1379
 vm_mmap_pgoff+0x12e/0x240 mm/util.c:556
 ksys_mmap_pgoff+0x2b8/0x330 mm/mmap.c:1425
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x0000000000436417 -> 0x0000000000449802

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 534 Comm: syz-executor.4 Not tainted 6.8.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/05 11:18 upstream 90d35da658da 5fc53669 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in perf_event_set_state / perf_event_update_userpage
* Struck through repros no longer work on HEAD.