提交 f442b1f0 编写于 作者: R Russell King (Oracle) 提交者: Yongqiang Liu

ARM: fix Thumb2 regression with Spectre BHB

stable inclusion
from stable-v4.19.235
commit 691f354689e94571853c79ac3d7d6e7f27dfb87b
category: bugfix
bugzilla: 186460, https://gitee.com/src-openeuler/kernel/issues/I53MHA
CVE: CVE-2022-23960

--------------------------------

commit 6c7cb60b 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: b9baf5c8 ("ARM: Spectre-BHB workaround")
Tested-by: NNathan Chancellor <nathan@kernel.org>
Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com>
Reviewed-by: NLiao Chang <liaochang1@huawei.com>
Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
上级 f22ff100
......@@ -1076,9 +1076,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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册