public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] ARM: fix Thumb2 regression with Spectre BHB
@ 2022-03-11 17:08 Russell King (Oracle)
  2022-03-11 17:11 ` Russell King (Oracle)
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King (Oracle) @ 2022-03-11 17:08 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-arm-kernel

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.

Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: fix Thumb2 regression with Spectre BHB
  2022-03-11 17:08 [PATCH] ARM: fix Thumb2 regression with Spectre BHB Russell King (Oracle)
@ 2022-03-11 17:11 ` Russell King (Oracle)
  0 siblings, 0 replies; 2+ messages in thread
From: Russell King (Oracle) @ 2022-03-11 17:11 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-arm-kernel

On Fri, Mar 11, 2022 at 05:08:07PM +0000, Russell King (Oracle) wrote:
> 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.
> 
> Tested-by: Nathan Chancellor <nathan@kernel.org>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Hmm, let me resend this with a Fixes tag and Cc stable!

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-11 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-11 17:08 [PATCH] ARM: fix Thumb2 regression with Spectre BHB Russell King (Oracle)
2022-03-11 17:11 ` Russell King (Oracle)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox