]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2022 13:35:18 +0000 (14:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2022 13:35:18 +0000 (14:35 +0100)
added patches:
arm-fix-thumb2-regression-with-spectre-bhb.patch

queue-4.9/arm-fix-thumb2-regression-with-spectre-bhb.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/arm-fix-thumb2-regression-with-spectre-bhb.patch b/queue-4.9/arm-fix-thumb2-regression-with-spectre-bhb.patch
new file mode 100644 (file)
index 0000000..ccae3f1
--- /dev/null
@@ -0,0 +1,37 @@
+From 6c7cb60bff7aec24b834343ff433125f469886a3 Mon Sep 17 00:00:00 2001
+From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
+Date: Fri, 11 Mar 2022 17:13:17 +0000
+Subject: ARM: fix Thumb2 regression with Spectre BHB
+
+From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
+
+commit 6c7cb60bff7aec24b834343ff433125f469886a3 upstream.
+
+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: b9baf5c8c5c3 ("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>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm/kernel/entry-armv.S |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/kernel/entry-armv.S
++++ b/arch/arm/kernel/entry-armv.S
+@@ -1074,9 +1074,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
index 8684bc08402ccf3c8eee424ff4bde795cdee1a0b..1807e5720e65c48669ebc961c6e6d3ee0be7519d 100644 (file)
@@ -16,3 +16,4 @@ staging-gdm724x-fix-use-after-free-in-gdm_lte_rx.patch
 kvm-arm64-reset-pmc_el0-to-avoid-a-panic-on-systems-with-no-pmu.patch
 batman-adv-request-iflink-once-in-batadv-on-batadv-check.patch
 batman-adv-don-t-expect-inter-netns-unique-iflink-indices.patch
+arm-fix-thumb2-regression-with-spectre-bhb.patch