[PATCH v2] ARM: fix Thumb2 regression with Spectre BHB
Russell King (Oracle)
rmk+kernel at armlinux.org.uk
Fri Mar 11 09:13:17 PST 2022
When building for Thumb2, the vectors make use of a local label. Sadly,
the Spectre BHB code also uses a local label with the same number which
results in the Thumb2 reference pointing at the wrong place. Fix this
by changing the number used for the Spectre BHB local label.
Fixes: b9baf5c8c5c3 ("ARM: Spectre-BHB workaround")
Tested-by: Nathan Chancellor <nathan at kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
---
arch/arm/kernel/entry-armv.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index faa0ca2ba576..63a9d59478fa 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -962,9 +962,9 @@ ENDPROC(vector_\name)
@ bhb workaround
mov r0, #8
-1: b . + 4
+3: b . + 4
subs r0, r0, #1
- bne 1b
+ bne 3b
dsb
isb
b 2b
--
2.30.2
More information about the linux-arm-kernel
mailing list