syzbot


KCSAN: data-race in perf_event_set_state / perf_event_update_time (2)

Status: auto-obsoleted due to no activity on 2024/02/27 20:45
Subsystems: perf
[Documentation on labels]
Reported-by: syzbot+693eea9bb25bc10906d4@syzkaller.appspotmail.com
First crash: 83d, last: 83d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in perf_event_set_state / perf_event_update_time perf 2 282d 289d 0/26 auto-obsoleted due to no activity on 2023/08/13 16:32

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

read to 0xffff88813a4340c0 of 8 bytes by task 8388 on cpu 0:
 __perf_update_times kernel/events/core.c:628 [inline]
 perf_event_update_time kernel/events/core.c:641 [inline]
 perf_event_set_state+0x14b/0x3f0 kernel/events/core.c:660
 event_sched_in+0xe2/0x670 kernel/events/core.c:2536
 group_sched_in kernel/events/core.c:2584 [inline]
 merge_sched_in kernel/events/core.c:3843 [inline]
 visit_groups_merge+0xbe0/0x1bb0 kernel/events/core.c:3788
 pmu_groups_sched_in kernel/events/core.c:3870 [inline]
 ctx_groups_sched_in+0xa0/0x100 kernel/events/core.c:3883
 ctx_sched_in+0x214/0x230 kernel/events/core.c:3937
 perf_event_sched_in kernel/events/core.c:2680 [inline]
 perf_event_context_sched_in kernel/events/core.c:3983 [inline]
 __perf_event_task_sched_in+0x470/0x790 kernel/events/core.c:4012
 perf_event_task_sched_in include/linux/perf_event.h:1484 [inline]
 finish_task_switch+0x20e/0x2a0 kernel/sched/core.c:5269
 context_switch kernel/sched/core.c:5403 [inline]
 __schedule+0x5d8/0x920 kernel/sched/core.c:6727
 __schedule_loop kernel/sched/core.c:6802 [inline]
 schedule+0x54/0x80 kernel/sched/core.c:6817
 exit_to_user_mode_loop kernel/entry/common.c:96 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline]
 syscall_exit_to_user_mode+0x9d/0x130 kernel/entry/common.c:212
 do_syscall_64+0x65/0x120 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

write to 0xffff88813a4340c0 of 8 bytes by task 8463 on cpu 1:
 perf_event_update_time+0x14d/0x1b0 kernel/events/core.c:641
 perf_mmap+0xa36/0xcb0 kernel/events/core.c:6618
 call_mmap include/linux/fs.h:2090 [inline]
 mmap_region+0x9a1/0x1650 mm/mmap.c:2819
 do_mmap+0x67e/0xa90 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+0x59/0x120 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x000000000053fd0f -> 0x000000000076c7cf

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8463 Comm: syz-executor.0 Tainted: G        W          6.8.0-rc1-syzkaller-00026-g7ed2632ec7d7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/23 20:44 upstream 7ed2632ec7d7 1e153dc8 .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_time
* Struck through repros no longer work on HEAD.