[PATCH 06/23] x86/srso: Fix SBPB enablement for spec_rstack_overflow=off

From: Josh Poimboeuf
Date: Fri Aug 25 2023 - 03:02:46 EST


If the user has requested no SRSO mitigation, other mitigations can use
the lighter-weight SBPB instead of IBPB.

Fixes: fb3bd914b3ec ("x86/srso: Add a Speculative RAS Overflow mitigation")
Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
---
arch/x86/kernel/cpu/bugs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index b0ae985aa6a4..10499bcd4e39 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -2433,7 +2433,7 @@ static void __init srso_select_mitigation(void)

switch (srso_cmd) {
case SRSO_CMD_OFF:
- return;
+ goto pred_cmd;

case SRSO_CMD_MICROCODE:
if (has_microcode) {
--
2.41.0