diff options
| author | Hungyu Lin <dennylin0707@gmail.com> | 2026-10-30 05:42:26 +0000 |
|---|---|---|
| committer | Thomas Gleixner <tglx@kernel.org> | 2026-11-09 20:15:58 +0100 |
| commit | 385b5ec1f31dd39297578eed42be74b07ae74017 (patch) | |
| tree | 502393e275c37ee71ee1ef711e150bca3fb2eba6 /tools/perf/scripts/python | |
| parent | 5e85b36768b7bba53a55b1c9a1b1cdcab3684634 (diff) | |
timekeeping: Read getboottime64() offsets under the sequence counter
getboottime64() computes the wall-clock boot timestamp from offs_real
minus offs_boot without checking tk_core.seq. A concurrent timekeeping
update can leave the reader with an inconsistent pair of offsets or,
on 32-bit systems, a torn 64-bit offset, producing an incorrect boot
timestamp.
Read both offsets under tk_core.seq and retry if an update overlaps
the sample. Convert the resulting local value to a timespec64 afterward.
Fixes: 7c3f1a573237 ("Introduce boot based time")
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Acked-by: John Stultz <jstultz@google.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261030054227.35453-2-dennylin0707@gmail.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
