]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
1228d692ea8a0354633854cb4604be4b6ef75d1a
[thirdparty/kernel/stable-queue.git] /
1 From 4b661d6133c5d3a7c9aca0b4ee5a78c7766eff3f Mon Sep 17 00:00:00 2001
2 From: Marc Zyngier <maz@kernel.org>
3 Date: Mon, 6 Jul 2020 17:38:01 +0100
4 Subject: arm64: arch_timer: Disable the compat vdso for cores affected by ARM64_WORKAROUND_1418040
5
6 From: Marc Zyngier <maz@kernel.org>
7
8 commit 4b661d6133c5d3a7c9aca0b4ee5a78c7766eff3f upstream.
9
10 ARM64_WORKAROUND_1418040 requires that AArch32 EL0 accesses to
11 the virtual counter register are trapped and emulated by the kernel.
12 This makes the vdso pretty pointless, and in some cases livelock
13 prone.
14
15 Provide a workaround entry that limits the vdso to 64bit tasks.
16
17 Signed-off-by: Marc Zyngier <maz@kernel.org>
18 Acked-by: Mark Rutland <mark.rutland@arm.com>
19 Cc: stable@vger.kernel.org
20 Link: https://lore.kernel.org/r/20200706163802.1836732-4-maz@kernel.org
21 Signed-off-by: Will Deacon <will@kernel.org>
22 Signed-off-by: Marc Zyngier <maz@kernel.org>
23 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24 ---
25 drivers/clocksource/arm_arch_timer.c | 8 ++++++++
26 1 file changed, 8 insertions(+)
27
28 --- a/drivers/clocksource/arm_arch_timer.c
29 +++ b/drivers/clocksource/arm_arch_timer.c
30 @@ -476,6 +476,14 @@ static const struct arch_timer_erratum_w
31 .set_next_event_virt = erratum_set_next_event_tval_virt,
32 },
33 #endif
34 +#ifdef CONFIG_ARM64_ERRATUM_1418040
35 + {
36 + .match_type = ate_match_local_cap_id,
37 + .id = (void *)ARM64_WORKAROUND_1418040,
38 + .desc = "ARM erratum 1418040",
39 + .disable_compat_vdso = true,
40 + },
41 +#endif
42 };
43
44 typedef bool (*ate_match_fn_t)(const struct arch_timer_erratum_workaround *,