Skip to content

Commit 3cfb301

Browse files
ardbiesheuvelRussell King (Oracle)
authored andcommitted
ARM: 9197/1: spectre-bhb: fix loop8 sequence for Thumb2
In Thumb2, 'b . + 4' produces a branch instruction that uses a narrow encoding, and so it does not jump to the following instruction as expected. So use W(b) instead. Fixes: 6c7cb60 ("ARM: fix Thumb2 regression with Spectre BHB") Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]>
1 parent 0dc14aa commit 3cfb301

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/kernel/entry-armv.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ vector_bhb_loop8_\name:
11451145

11461146
@ bhb workaround
11471147
mov r0, #8
1148-
3: b . + 4
1148+
3: W(b) . + 4
11491149
subs r0, r0, #1
11501150
bne 3b
11511151
dsb

0 commit comments

Comments
 (0)