arm64: Introduce a way to disable the 32bit vdso
authorMarc Zyngier <maz@kernel.org>
Mon, 6 Jul 2020 16:37:59 +0000 (17:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jul 2020 06:13:34 +0000 (08:13 +0200)
commit0f907048b7ea67d0f1145c27fc734d4af0ddc93f
treec8c962f37780986e209cf3df5671934e6904dd6e
parent016bc797c3b95f2a5975d332645602d3fb5741eb
arm64: Introduce a way to disable the 32bit vdso

commit 97884ca8c2925d14c32188e865069f21378b4b4f upstream.

We have a class of errata (grouped under the ARM64_WORKAROUND_1418040
banner) that force the trapping of counter access from 32bit EL0.

We would normally disable the whole vdso for such defect, except that
it would disable it for 64bit userspace as well, which is a shame.

Instead, add a new vdso_clock_mode, which signals that the vdso
isn't usable for compat tasks.  This gets checked in the new
vdso_clocksource_ok() helper, now provided for the 32bit vdso.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200706163802.1836732-2-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/vdso/clocksource.h
arch/arm64/include/asm/vdso/compat_gettimeofday.h