Commit 954cbd48 authored by Ben Hutchings's avatar Ben Hutchings Committed by Zheng Zengkai
Browse files

x86/speculation: Make all RETbleed mitigations 64-bit only

stable inclusion
from stable-v5.10.136
commit 45b69848a2fea11c03f3a54241416e36eb94e38c
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZWNE

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=45b69848a2fea11c03f3a54241416e36eb94e38c



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

commit b648ab48 upstream.

The mitigations for RETBleed are currently ineffective on x86_32 since
entry_32.S does not use the required macros.  However, for an x86_32
target, the kconfig symbols for them are still enabled by default and
/sys/devices/system/cpu/vulnerabilities/retbleed will wrongly report
that mitigations are in place.

Make all of these symbols depend on X86_64, and only enable RETHUNK by
default on X86_64.

Fixes: f43b9876 ("x86/retbleed: Add fine grained Kconfig knobs")
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/YtwSR3NNsWp1ohfV@decadent.org.uk


[bwh: Backported to 5.10/5.15/5.18: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent d68367c4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment