Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp868072rdb; Fri, 25 Aug 2023 03:50:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+O643BAPsJAz4IiwkWpH/qzwpnlP8ZbYn0CiEHQLs3jtML+EarVItdLUnmIifmAllu6oj X-Received: by 2002:a17:902:ea08:b0:1c0:a30e:2388 with SMTP id s8-20020a170902ea0800b001c0a30e2388mr9517133plg.31.1692960631219; Fri, 25 Aug 2023 03:50:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692960631; cv=none; d=google.com; s=arc-20160816; b=VfH9KnXMlFgTThVGACfQqSiiUy/81nI32c6IaSkYHisHRCed6qMMOvMBq+vJUYVgvg 6jZOmQtuLTxHKIKcABSJmpkgmiMf97/Adn7ICpFGsEA6I1f0O6b+1ksLpB8HMu3svk9g 603HI8873koe49tL9nxhH2cUmxXkyVTtdFfNOxI9jFeYcTp5KzYlxf8ShkY8Pv2nYwgv aN94mslz9kM+Nlm1OfU/l6ia9oIPYaBxjkmd2BNV+k21BNTet2LPkt19NkBRCnhs+6pF ZJoyb+Dg/8s0E1dW3nUqdcoZLAu5deYL0lPMPGZA5uhtvo+zG11VvrREWhdmcZS+Tk4j 5DzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LR1WuO7Rd11jdpaoxMTVIscNHd/g6pPAM0I8qNb/xC4=; fh=ZwaEcDYNCnlh+U7YxZ1LCEcet9pcdhSkEX0cCEOksvY=; b=CrpJdEVI3LtoTaBFiV6WCcVNO0H93/xyg8O0HihZiMwa671swWawV4lpMkgqQBJc32 ft9ahN4Iicd5yJYsR7vN8q6GJrRek5ECCkcrV2G3NouZlz7Hi0CtkymrfYg/b4LF1nl+ +ra+R0ticUUcEQX7kM9X8oW2xggjLirsAIy1GPD5P1xIun1nN/AnsYyfZXEBbdVQc76/ oEMWmJa/5lC0lIsmtl2n+LWUPJt7Hz6B08p6K1fk802jwIbQRqP28dgdGEJYHieZBDDc OnQRjfHqEa3xR0+65R+hx6hJXSQHHRtYrSYtN2sB+kaYID31BX7I+k2f3Y1gl40IKVmX hhgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z2LrM29a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t15-20020a1709027fcf00b001bb2093efb6si1536233plb.45.2023.08.25.03.50.15; Fri, 25 Aug 2023 03:50:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z2LrM29a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242723AbjHYHCQ (ORCPT + 99 others); Fri, 25 Aug 2023 03:02:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241784AbjHYHCI (ORCPT ); Fri, 25 Aug 2023 03:02:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90A2819AC for ; Fri, 25 Aug 2023 00:02:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7282064B51 for ; Fri, 25 Aug 2023 07:02:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D6B2C433CA; Fri, 25 Aug 2023 07:02:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692946925; bh=wseebdWJGAG73aEf4oxCFFQ8XYhFMGqIJFkJEq0d3CE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z2LrM29aakLBo+Q0t4HA//gIgNz0uDTlsDHprcNdBIcZmE1TlwdX7b1c+fBuDrjPH ExK+8I/Qt7Mlqlx/6uVxfQi4pPcllQP829Qmi1LFAf8f4vqai/djWmEu+aXa0gxe0R vcmHeBFUnn+S2/E0std2EkgoTyfxi6EiozmU0IhkYOjPmBDshjF4QTbeFSZW8xda5j 6QkFC8CIg5kN3ioi+wnM4kJLpC582F4V6aq7Vl+WEdBbldQgYsXA3m6e0x3CCzsS9F IBD2pvW3xEgP/lpnlzMBFRGwFU0wjjSBYpB3gTXIiJ/aZjB8yJ1KH6D7hYbf+0hCbO NFgwowMSkLk+w== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Borislav Petkov , Peter Zijlstra , Babu Moger , Paolo Bonzini , Sean Christopherson , David.Kaplan@amd.com, Andrew Cooper , Nikolay Borisov , gregkh@linuxfoundation.org, Thomas Gleixner Subject: [PATCH 06/23] x86/srso: Fix SBPB enablement for spec_rstack_overflow=off Date: Fri, 25 Aug 2023 00:01:37 -0700 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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