syzbot


KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage (9)

Status: moderation: reported on 2024/11/26 05:14
Subsystems: perf
[Documentation on labels]
Reported-by: syzbot+41e004d051e6772142c9@syzkaller.appspotmail.com
First crash: 18h16m, last: 18h16m
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage (3) perf 1 1398d 1398d 0/28 auto-closed as invalid on 2021/03/04 07:39
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage (4) perf 1 1185d 1185d 0/28 auto-closed as invalid on 2021/10/03 20:31
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage (6) perf 2 967d 975d 0/28 auto-closed as invalid on 2022/05/09 12:46
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage (7) perf 3 743d 794d 0/28 auto-obsoleted due to no activity on 2022/12/19 05:19
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage perf 4 1763d 1848d 0/28 auto-closed as invalid on 2020/04/08 20:02
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage (5) perf 3 1013d 1020d 0/28 auto-closed as invalid on 2022/03/24 05:30
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage (2) perf 1 1589d 1589d 0/28 auto-closed as invalid on 2020/08/25 03:47
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage (8) perf 2 495d 511d 0/28 auto-obsoleted due to no activity on 2023/08/24 03:09

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

write to 0xffff8881346ef010 of 8 bytes by task 32165 on cpu 0:
 perf_event_update_userpage+0x2fa/0x460 kernel/events/core.c:6260
 cpu_clock_event_add+0x116/0x130 kernel/events/core.c:11374
 event_sched_in+0x47c/0x6d0 kernel/events/core.c:2620
 group_sched_in kernel/events/core.c:2653 [inline]
 merge_sched_in kernel/events/core.c:3924 [inline]
 visit_groups_merge+0xc26/0x1c00 kernel/events/core.c:3869
 pmu_groups_sched_in kernel/events/core.c:3951 [inline]
 __pmu_ctx_sched_in+0xc8/0xf0 kernel/events/core.c:3963
 ctx_sched_in+0x361/0x3b0 kernel/events/core.c:4014
 perf_event_sched_in kernel/events/core.c:2751 [inline]
 perf_event_context_sched_in kernel/events/core.c:4061 [inline]
 __perf_event_task_sched_in+0x56a/0xa10 kernel/events/core.c:4090
 perf_event_task_sched_in include/linux/perf_event.h:1517 [inline]
 finish_task_switch+0x218/0x2b0 kernel/sched/core.c:5238
 context_switch kernel/sched/core.c:5372 [inline]
 __schedule+0x6fa/0x930 kernel/sched/core.c:6756
 __schedule_loop kernel/sched/core.c:6833 [inline]
 schedule+0x55/0xc0 kernel/sched/core.c:6848
 exit_to_user_mode_loop kernel/entry/common.c:102 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0x42/0x120 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffff8881346ef010 of 8 bytes by task 32163 on cpu 1:
 perf_event_update_userpage+0x382/0x460 kernel/events/core.c:6260
 _perf_event_reset+0x36/0x40 kernel/events/core.c:5859
 perf_event_for_each_child kernel/events/core.c:5894 [inline]
 perf_event_for_each kernel/events/core.c:5910 [inline]
 _perf_ioctl kernel/events/core.c:6107 [inline]
 perf_ioctl+0x41a/0x1550 kernel/events/core.c:6126
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:906 [inline]
 __se_sys_ioctl+0xc9/0x140 fs/ioctl.c:892
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:892
 x64_sys_call+0x1690/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000017c5b -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 32163 Comm: syz.4.8880 Not tainted 6.12.0-syzkaller-09435-g2c22dc1ee3a1 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

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