summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-04-20 11:46:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-25 10:14:36 +0300
commiteb92a8ecce23b2a8b7d0387322abd3196fa794b5 (patch)
tree48d2d736448787e42049af5bc5e92749e7ed85db /arch
parent463a7b957db0d2c96871f446b0c94d39a9bee244 (diff)
downloadlinux-eb92a8ecce23b2a8b7d0387322abd3196fa794b5.tar.xz
ARM: 9197/1: spectre-bhb: fix loop8 sequence for Thumb2
[ Upstream commit 3cfb3019979666bdf33a1010147363cf05e0f17b ] 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: 6c7cb60bff7a ("ARM: fix Thumb2 regression with Spectre BHB") Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/entry-armv.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 3d65fa56a0e5..8e8efe28d799 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -1043,7 +1043,7 @@ vector_bhb_loop8_\name:
@ bhb workaround
mov r0, #8
-3: b . + 4
+3: W(b) . + 4
subs r0, r0, #1
bne 3b
dsb