summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2023-09-04 22:04:59 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-28 17:20:16 +0000
commitb4166941c03dc0b8b958ff3f295ad6e67f967a3d (patch)
tree0a605198eee25751f63a6b3ad130f1e436c32f98 /arch
parent154438369cbd93b00a852c94103c7a342ffd3256 (diff)
downloadlinux-stable-b4166941c03dc0b8b958ff3f295ad6e67f967a3d.tar.gz
linux-stable-b4166941c03dc0b8b958ff3f295ad6e67f967a3d.tar.bz2
linux-stable-b4166941c03dc0b8b958ff3f295ad6e67f967a3d.zip
x86/srso: Move retbleed IBPB check into existing 'has_microcode' code block
commit 351236947a45a512c517153bbe109fe868d05e6d upstream. Simplify the code flow a bit by moving the retbleed IBPB check into the existing 'has_microcode' block. Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Acked-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/0a22b86b1f6b07f9046a9ab763fc0e0d1b7a91d4.1693889988.git.jpoimboe@kernel.org Cc: Caleb Jorden <cjorden@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/bugs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index a55a3864df1c..0bc55472f303 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -2422,10 +2422,8 @@ static void __init srso_select_mitigation(void)
setup_force_cpu_cap(X86_FEATURE_SRSO_NO);
return;
}
- }
- if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) {
- if (has_microcode) {
+ if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) {
srso_mitigation = SRSO_MITIGATION_IBPB;
goto out;
}