summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/vdso.h
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2019-04-29 17:26:22 +0100
committerWill Deacon <will.deacon@arm.com>2019-04-30 11:04:23 +0100
commit75a19a0202db21638a1c2b424afb867e1f9a2376 (patch)
tree7886de29f3a9a5e2b0b02e71b4bdaa93a3c6fffe /arch/arm64/include/asm/vdso.h
parent2f1d4e24d91b1f475f939685e19bb1e537031661 (diff)
downloadlinux-75a19a0202db21638a1c2b424afb867e1f9a2376.tar.bz2
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>
Diffstat (limited to 'arch/arm64/include/asm/vdso.h')
0 files changed, 0 insertions, 0 deletions