linux/arch/arm64
Will Deacon 75a19a0202 arm64: arch_timer: Ensure counter register reads occur with seqlock held
When executing clock_gettime(), either in the vDSO or via a system call,
we need to ensure that the read of the counter register occurs within
the seqlock reader critical section. This ensures that updates to the
clocksource parameters (e.g. the multiplier) are consistent with the
counter value and therefore avoids the situation where time appears to
go backwards across multiple reads.

Extend the vDSO logic so that the seqlock critical section covers the
read of the counter register as well as accesses to the data page. Since
reads of the counter system registers are not ordered by memory barrier
instructions, introduce dependency ordering from the counter read to a
subsequent memory access so that the seqlock memory barriers apply to
the counter access in both the vDSO and the system call paths.

Cc: <stable@vger.kernel.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Tested-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/linux-arm-kernel/alpine.DEB.2.21.1902081950260.1662@nanos.tec.linutronix.de/
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-04-30 11:04:23 +01:00
..
boot arm64: Use the correct style for SPDX License Identifier 2019-04-16 16:28:01 +01:00
configs Allwinner arm64 defconfig changes for 5.1 2019-02-15 16:51:26 +01:00
crypto arm64: HWCAP: add support for AT_HWCAP2 2019-04-16 16:27:12 +01:00
include arm64: arch_timer: Ensure counter register reads occur with seqlock held 2019-04-30 11:04:23 +01:00
kernel arm64: arch_timer: Ensure counter register reads occur with seqlock held 2019-04-30 11:04:23 +01:00
kvm KVM: arm64: Reset the PMU in preemptible context 2019-03-19 17:56:24 +00:00
lib arm64: Makefile: Replace -pg with CC_FLAGS_FTRACE 2019-04-09 10:34:59 +01:00
mm arm64: Save and restore OSDLR_EL1 across suspend/resume 2019-04-09 12:39:13 +01:00
net
xen
Kconfig arm64: Kconfig: Tidy up errata workaround help text 2019-04-29 14:21:11 +01:00
Kconfig.debug
Kconfig.platforms This pull request brings in a build fix for arm64 with bcm2835 2019-03-18 10:31:24 -07:00
Makefile