aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPawan Gupta <pawan.kumar.gupta@linux.intel.com>2025-05-20 22:35:20 -0700
committerBorislav Petkov (AMD) <bp@alien8.de>2025-05-21 11:51:32 +0200
commit6a7c3c2606105a41dde81002c0037420bc1ddf00 (patch)
treeade277da5f8f12f8a5c8d9a883f9aa5ed567f604
parentx86/bugs: Restructure ITS mitigation (diff)
downloadwireguard-linux-6a7c3c2606105a41dde81002c0037420bc1ddf00.tar.xz
wireguard-linux-6a7c3c2606105a41dde81002c0037420bc1ddf00.zip
x86/bugs: Fix spectre_v2 mitigation default on Intel
Commit 480e803dacf8 ("x86/bugs: Restructure spectre_v2 mitigation") inadvertently changed the spectre-v2 mitigation default from eIBRS to IBRS on Intel. While splitting the spectre_v2 mitigation in select/update/apply functions, eIBRS and IBRS selection logic was separated in select and update. This caused IBRS selection to not consider that eIBRS mitigation is already selected, fix it. Fixes: 480e803dacf8 ("x86/bugs: Restructure spectre_v2 mitigation") Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/20250520-eibrs-fix-v1-1-91bacd35ed09@linux.intel.com
Diffstat (limited to '')
-rw-r--r--arch/x86/kernel/cpu/bugs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 3d5796d25f78..7f94e6a5497d 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -2105,7 +2105,8 @@ static void __init spectre_v2_select_mitigation(void)
static void __init spectre_v2_update_mitigation(void)
{
- if (spectre_v2_cmd == SPECTRE_V2_CMD_AUTO) {
+ if (spectre_v2_cmd == SPECTRE_V2_CMD_AUTO &&
+ !spectre_v2_in_eibrs_mode(spectre_v2_enabled)) {
if (IS_ENABLED(CONFIG_MITIGATION_IBRS_ENTRY) &&
boot_cpu_has_bug(X86_BUG_RETBLEED) &&
retbleed_mitigation != RETBLEED_MITIGATION_NONE &&