aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-armv.S
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-04-20 10:02:43 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2022-05-20 12:33:47 +0100
commit1290c70d72b2959ba0a4e029edfcb7afa62a5c73 (patch)
tree305f9c15f843d4f8011e5956f83307713430f932 /arch/arm/kernel/entry-armv.S
parentARM: 9199/1: spectre-bhb: use local DSB and elide ISB in loop8 sequence (diff)
downloadlinux-dev-1290c70d72b2959ba0a4e029edfcb7afa62a5c73.tar.xz
linux-dev-1290c70d72b2959ba0a4e029edfcb7afa62a5c73.zip
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 <ardb@kernel.org> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to '')
-rw-r--r--arch/arm/kernel/entry-armv.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 43ab77553e84..df02044e1d6c 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -1094,7 +1094,8 @@ vector_\name:
stmia sp, {r0, lr} @ save r0, lr
@ Save spsr_<exception> (parent CPSR)
-2: mrs lr, spsr
+.Lvec_\name:
+ mrs lr, spsr
str lr, [sp, #8] @ save spsr
@
@@ -1134,7 +1135,7 @@ vector_bhb_loop8_\name:
dsb nsh
@ isb not needed due to "movs pc, lr" in the vector stub
@ which gives a "context synchronisation".
- b 2b
+ b .Lvec_\name
ENDPROC(vector_bhb_loop8_\name)
.previous
#endif