kernel_optimize_test/kernel/time
Thomas Gleixner b99328a60a 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: 44f57d788e ("timekeeping: Provide a generic update_vsyscall() implementation")
Reported-by: Chris Clayton <chris2553@googlemail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Chris Clayton <chris2553@googlemail.com>
Tested-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1908221257580.1983@nanos.tec.linutronix.de
2019-08-23 02:12:11 +02:00
..
alarmtimer.c alarmtimer: Fix kerneldoc comment for alarmtimer_suspend() 2019-06-14 17:04:04 +02:00
clockevents.c
clocksource.c clocksource: Move inline keyword to the beginning of function declarations 2019-06-14 17:04:03 +02:00
hrtimer.c hrtimer: Use a bullet for the returns bullet list 2019-06-27 23:30:04 +02:00
itimer.c
jiffies.c
Kconfig
Makefile timekeeping: Provide a generic update_vsyscall() implementation 2019-06-22 21:21:06 +02:00
ntp_internal.h
ntp.c ntp: Limit TAI-UTC offset 2019-06-22 11:28:53 +02:00
posix-clock.c
posix-cpu-timers.c
posix-stubs.c
posix-timers.c posix-timers: Use spin_lock_irq() in itimer_delete() 2019-06-22 12:14:22 +02:00
posix-timers.h
sched_clock.c
test_udelay.c
tick-broadcast-hrtimer.c
tick-broadcast.c
tick-common.c
tick-internal.h
tick-oneshot.c
tick-sched.c sched/fair: Remove the rq->cpu_load[] update code 2019-06-03 11:49:38 +02:00
tick-sched.h
time.c time: Validate user input in compat_settimeofday() 2019-07-07 12:05:40 +02:00
timeconst.bc
timeconv.c
timecounter.c
timekeeping_debug.c
timekeeping_internal.h
timekeeping.c timekeeping/vsyscall: Prevent math overflow in BOOTTIME update 2019-08-23 02:12:11 +02:00
timekeeping.h
timer_list.c timer_list: Guard procfs specific code 2019-06-23 00:08:52 +02:00
timer.c
vsyscall.c timekeeping/vsyscall: Prevent math overflow in BOOTTIME update 2019-08-23 02:12:11 +02:00