linux/include
Thomas Gleixner f8fc36851c UPSTREAM: 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

(cherry picked from commit b99328a60a)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I61f5da6821a95b4cb855f737ef0dc94acbb1ccfe
2020-11-16 09:22:35 +01:00
..
acpi x86: ACPI: fix CPU hotplug deadlock 2020-04-23 10:30:20 +02:00
asm-generic This is the 4.19.156 stable release 2020-11-10 13:23:09 +01:00
clocksource ANDROID: GKI: drivers: clksource: Add API to return cval 2020-04-02 23:32:47 +00:00
crypto UPSTREAM: crypto: x86/chacha-sse3 - use unaligned loads for state array 2020-10-25 11:48:06 +01:00
drm Revert "drm/dsi: Fix byte order of DCS set/get brightness" 2020-07-01 18:58:38 +00:00
dt-bindings dt-bindings: reset: meson8b: fix duplicate reset IDs 2020-01-23 08:21:26 +01:00
keys KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:30:24 +02:00
kvm
linux UPSTREAM: timekeeping/vsyscall: Prevent math overflow in BOOTTIME update 2020-11-16 09:22:35 +01:00
math-emu math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning 2019-12-13 08:51:34 +01:00
media ANDROID: media: increase video max frame number 2020-04-16 23:00:21 +00:00
memory
misc
net UPSTREAM: ipv6: ndisc: RFC-ietf-6man-ra-pref64-09 is now published as RFC8781 2020-11-16 07:43:08 +01:00
pcmcia
ras
rdma RDMA/core: Fix double destruction of uobject 2020-06-03 08:19:43 +02:00
scsi This is the 4.19.154 stable release 2020-10-30 11:43:26 +01:00
soc irqchip/eznps: Fix build error for !ARC700 builds 2020-09-17 13:45:25 +02:00
sound This is the 4.19.135 stable release 2020-07-29 13:22:30 +02:00
target scsi: target: fix hang when multiple threads try to destroy the same iscsi session 2020-04-21 09:03:11 +02:00
trace This is the 4.19.154 stable release 2020-10-30 11:43:26 +01:00
uapi ANDROID: fuse: Add support for d_canonical_path 2020-11-09 13:11:29 +00:00
vdso UPSTREAM: vdso: Fix clocksource.h macro detection 2020-05-03 16:11:10 +00:00
video
xen xen/events: add a new "late EOI" evtchn framework 2020-11-05 11:08:36 +01:00