Skip to content

Commit

Permalink
ARM: fix Thumb2 regression with Spectre BHB
Browse files Browse the repository at this point in the history
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: b9baf5c ("ARM: Spectre-BHB workaround")
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Russell King (Oracle) authored and Linus Torvalds committed Mar 11, 2022
1 parent 3977a3f commit 6c7cb60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/kernel/entry-armv.S
Original file line number Diff line number Diff line change
@@ -1040,9 +1040,9 @@ vector_bhb_loop8_\name:

@ bhb workaround
mov r0, #8
1: b . + 4
3: b . + 4
subs r0, r0, #1
bne 1b
bne 3b
dsb
isb
b 2b

0 comments on commit 6c7cb60

Please sign in to comment.