-
由 Thomas Gleixner 提交于
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: 44f57d78 ("timekeeping: Provide a generic update_vsyscall() implementation") Reported-by: NChris Clayton <chris2553@googlemail.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Tested-by: NChris Clayton <chris2553@googlemail.com> Tested-by: NVincenzo Frascino <vincenzo.frascino@arm.com> Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1908221257580.1983@nanos.tec.linutronix.de
b99328a6