From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23305E7C4E9 for ; Wed, 4 Oct 2023 18:14:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244001AbjJDSOe (ORCPT ); Wed, 4 Oct 2023 14:14:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244000AbjJDSOe (ORCPT ); Wed, 4 Oct 2023 14:14:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47875A7 for ; Wed, 4 Oct 2023 11:14:30 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8AFAFC433C7; Wed, 4 Oct 2023 18:14:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696443269; bh=yHB5Lhg4+HUhmQLnj4d8SX1iby66eZcrwKV22/BVLxk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dBC30nwiXh/HVEnCNqaQoa7aHKhEGb1+GsXZgF/6JVQGBt8P53FMa1ubYk6tuCRi+ 7gcEYmcyBCUIHFx1/hkyvNCKMbTaTmA7jNSFO9LcZoWAJ9UNjkdBuU8igmFGVv/zdV XCkQkPVUj8sOhnPUUlUSZF9esDV+VybzI+mPaRLs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Josh Poimboeuf , Ingo Molnar , "Borislav Petkov (AMD)" , Sasha Levin Subject: [PATCH 6.1 068/259] x86/srso: Fix SBPB enablement for spec_rstack_overflow=off Date: Wed, 4 Oct 2023 19:54:01 +0200 Message-ID: <20231004175220.518029569@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231004175217.404851126@linuxfoundation.org> References: <20231004175217.404851126@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Josh Poimboeuf [ Upstream commit 01b057b2f4cc2d905a0bd92195657dbd9a7005ab ] 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 Signed-off-by: Ingo Molnar Signed-off-by: Borislav Petkov (AMD) Acked-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/b20820c3cfd1003171135ec8d762a0b957348497.1693889988.git.jpoimboe@kernel.org Signed-off-by: Sasha Levin --- 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 5f38d60532a99..263df737d5cd5 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -2414,7 +2414,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.40.1