Skip to content

Commit 1290c70

Browse files
ardbiesheuvelRussell King (Oracle)
authored andcommitted
ARM: 9200/1: spectre-bhb: avoid cross-subsection jump using a numbered label
In order to minimize potential confusion regarding numbered labels appearing in a different order in the assembler output due to the use of subsections, use a named local label to jump back into the vector handler code from the associated loop8 mitigation sequence. Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]>
1 parent 892c608 commit 1290c70

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/arm/kernel/entry-armv.S

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,8 @@ vector_\name:
10941094
stmia sp, {r0, lr} @ save r0, lr
10951095

10961096
@ Save spsr_<exception> (parent CPSR)
1097-
2: mrs lr, spsr
1097+
.Lvec_\name:
1098+
mrs lr, spsr
10981099
str lr, [sp, #8] @ save spsr
10991100

11001101
@
@@ -1134,7 +1135,7 @@ vector_bhb_loop8_\name:
11341135
dsb nsh
11351136
@ isb not needed due to "movs pc, lr" in the vector stub
11361137
@ which gives a "context synchronisation".
1137-
b 2b
1138+
b .Lvec_\name
11381139
ENDPROC(vector_bhb_loop8_\name)
11391140
.previous
11401141
#endif

0 commit comments

Comments
 (0)