kernel-fxtec-pro1x/kernel/time
Huacai Chen d39c24f5c2 UPSTREAM: timekeeping/vsyscall: Update VDSO data unconditionally
The update of the VDSO data is depending on __arch_use_vsyscall() returning
True. This is a leftover from the attempt to map the features of various
architectures 1:1 into generic code.

The usage of __arch_use_vsyscall() in the actual vsyscall implementations
got dropped and replaced by the requirement for the architecture code to
return U64_MAX if the global clocksource is not usable in the VDSO.

But the __arch_use_vsyscall() check in the update code stayed which causes
the VDSO data to be stale or invalid when an architecture actually
implements that function and returns False when the current clocksource is
not usable in the VDSO.

As a consequence the VDSO implementations of clock_getres(), time(),
clock_gettime(CLOCK_.*_COARSE) operate on invalid data and return bogus
information.

Remove the __arch_use_vsyscall() check from the VDSO update function and
update the VDSO data unconditionally.

[ tglx: Massaged changelog and removed the now useless implementations in
  	asm-generic/ARM64/MIPS ]

Fixes: 44f57d788e7deecb50 ("timekeeping: Provide a generic update_vsyscall() implementation")
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/1571887709-11447-1-git-send-email-chenhc@lemote.com
(cherry picked from commit 52338415cf4d4064ae6b8dd972dadbda841da4fa)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 158635600
Bug: 154668398
Bug: 157925983
Change-Id: I71691d3011a96256d1ce01718d3f0fdc0778920e
2020-06-15 15:23:37 +00:00
..
alarmtimer.c This is the 4.19.103 stable release 2020-02-11 15:05:03 -08:00
clockevents.c
clocksource.c clocksource: Prevent double add_timer_on() for watchdog_timer 2020-02-11 04:34:18 -08:00
hrtimer.c hrtimer: Annotate lockless access to timer->state 2020-01-04 19:13:32 +01:00
itimer.c
jiffies.c
Kconfig
Makefile UPSTREAM: timekeeping: Provide a generic update_vsyscall() implementation 2020-04-27 22:51:55 -07:00
ntp.c
ntp_internal.h
posix-clock.c ptp: fix the race between the release of ptp_clock and cdev 2020-01-04 19:13:35 +01:00
posix-cpu-timers.c
posix-stubs.c
posix-timers.c
posix-timers.h
sched_clock.c
test_udelay.c
tick-broadcast-hrtimer.c tick: broadcast-hrtimer: Fix a race in bc_set_next 2019-10-11 18:21:28 +02:00
tick-broadcast.c
tick-common.c
tick-internal.h
tick-oneshot.c
tick-sched.c ANDROID: GKI: export symbols from abi_gki_aarch64_qcom_whitelist 2020-04-13 21:36:41 +00:00
tick-sched.h
time.c y2038: make do_gettimeofday() and get_seconds() inline 2019-11-20 18:45:24 +01:00
timeconst.bc
timeconv.c
timecounter.c
timekeeping.c y2038: make do_gettimeofday() and get_seconds() inline 2019-11-20 18:45:24 +01:00
timekeeping.h
timekeeping_debug.c
timekeeping_internal.h
timer.c timer: Read jiffies once when forwarding base clk 2019-10-11 18:20:59 +02:00
timer_list.c
vsyscall.c UPSTREAM: timekeeping/vsyscall: Update VDSO data unconditionally 2020-06-15 15:23:37 +00:00