summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorDennis Moshegov <dennis@xzync.uk>2026-07-24 16:43:55 +0100
committerThomas Gleixner <tglx@kernel.org>2026-08-10 17:52:19 +0200
commitd7fc133bf91f713df72facebd41ae9dfc83e35f7 (patch)
treede6d98a3b89338abb55f442344f2716949b4dfe9 /tools/perf/scripts/python/bin/stackcollapse-report
parentecc330e3096173f433659aa64ab3674d0d48440e (diff)
timekeeping: Use READ_ONCE/WRITE_ONCE() for xtime_sec to prevent tearing
The timekeeper update path uses a bulk memcpy() to synchronize the timekeeper structure, which is not guaranteed to be atomic. This allows for torn reads in ktime_get_real_seconds() on 64-bit systems, where the sequence counter protection is bypassed for performance. To prevent reading a torn 64-bit xtime_sec value, enforce atomic-like access by using WRITE_ONCE() for the critical field before the bulk memcpy() in timekeeping_update_from_shadow(). Correspondingly, use READ_ONCE() in ktime_get_real_seconds() to ensure a fresh, consistent load from memory. [ tglx: Format changelog and add comment ] Reported-by: syzbot+72789cd1697965e714ca@syzkaller.appspotmail.com Signed-off-by: Dennis Moshegov <dennis@xzync.uk> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260724154405.70-1-dennis@xzync.uk Closes: https://syzkaller.appspot.com/bug?extid=72789cd1697965e714ca
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions