diff options
| author | Thomas Gleixner <[email protected]> | 2019-08-22 11:00:15 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2019-08-23 00:12:11 +0000 |
| commit | b99328a60a482108f5195b4d611f90992ca016ba (patch) | |
| tree | 694e2d7be207a6d3220e5346e8b94f470083656e /tools/perf/scripts/python | |
| parent | Merge tag 'pci-v5.3-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
| download | kernel-b99328a60a482108f5195b4d611f90992ca016ba.tar.gz kernel-b99328a60a482108f5195b4d611f90992ca016ba.zip | |
timekeeping/vsyscall: Prevent math overflow in BOOTTIME update
The VDSO update for CLOCK_BOOTTIME has a overflow issue as it shifts the
nanoseconds based boot time offset left by the clocksource shift. That
overflows once the boot time offset becomes large enough. As a consequence
CLOCK_BOOTTIME in the VDSO becomes a random number causing applications to
misbehave.
Fix it by storing a timespec64 representation of the offset when boot time
is adjusted and add that to the MONOTONIC base time value in the vdso data
page. Using the timespec64 representation avoids a 64bit division in the
update code.
Fixes: 44f57d788e7d ("timekeeping: Provide a generic update_vsyscall() implementation")
Reported-by: Chris Clayton <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Tested-by: Chris Clayton <[email protected]>
Tested-by: Vincenzo Frascino <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
