From patchwork Tue Sep 19 09:45:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 141865 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp3350146vqi; Tue, 19 Sep 2023 05:36:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEY610CbHU3ZSio2/EZ1ozQ6JbWdIRgCkOyHpf6c0D8mLiyqfnG+9Urf4H02lNBud/K/je8 X-Received: by 2002:a05:6a20:1608:b0:130:7ef2:ff21 with SMTP id l8-20020a056a20160800b001307ef2ff21mr2921887pzj.19.1695127005631; Tue, 19 Sep 2023 05:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695127005; cv=none; d=google.com; s=arc-20160816; b=f4FzW4I2sLbdpHg5XZErk3EjHQmkEa6eoH0TWxXJ2coBKPuYWf/8hEaySHDXiWJQNM HMtkdLA+NIKG2mwabJycit9TjfaPnvd7iR9GNQwqu7pYlUjv2twlbHzlfOHNZYyIKelG o7JNqUsYUU1byMLrrpJeF3bAIPNtbjoL75y0NbXnj3rvCTtuk1ESCEKKY2Ltp8ZNomom 9h0VdpvDqVeJhN6FdNjlszdwabxvYAX4pR46NjKgFXlQQgdxqfJl7jaXJ7Q2hLDpYaH1 Tcl+XnHZ/4ZIrTEi8RX2k4GugQGX+TjESxGAvaznNdIk3aUd8o+hC3ZiRSxJ7p0iRtuf +ZTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=3d8xIsc4sePtutJqhd6WlEejexYZaNqODb5FCP/tcuA=; fh=TJa98jjcJcAUyvo2yQiOqi+wukdLlQU80th5XskGe8U=; b=rlbBahlzX6Hf4/RXslzO9bqixS5O1MY1Vf88/9B6sIb3nCcvvIxoqsjrPbSi9+WqbM OqEBHACmIqtid6mjpuspJgbHVZhY6Fu2pyYilxVnfWWeBEpewvSfEUqphJbKVyh/rCoL szkBQkItkFKBFmysw5MKesEVG799KQ7E05IaVEG/q5m4PEzNdoFxS2v+Ok04K0zftzhY Va497VqunLNeuffNYZP907nbNl/hwfiWM0Auvpixtj30qY1ARZDdxaMabdhxjHfhP3xY hC10i772i3clwupxCA2KXIfcsH8/fopz9xjcdPUncKxpPtfHAS4YQwtbjEpyQCeWKNwv UxFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=SCKlqV+p; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id p127-20020a634285000000b00573fe49ad3esi9552510pga.672.2023.09.19.05.36.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 05:36:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=SCKlqV+p; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id A32EF807D8D8; Tue, 19 Sep 2023 02:45:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231459AbjISJpS (ORCPT + 26 others); Tue, 19 Sep 2023 05:45:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231515AbjISJpP (ORCPT ); Tue, 19 Sep 2023 05:45:15 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C583D9E; Tue, 19 Sep 2023 02:45:07 -0700 (PDT) Date: Tue, 19 Sep 2023 09:45:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1695116705; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3d8xIsc4sePtutJqhd6WlEejexYZaNqODb5FCP/tcuA=; b=SCKlqV+po1aiem+Br/mUwBQ+iiTj4DfPIUN9bXm/4RXIpeMBezw1y6XQDMfIaBHtOJ6QNT 0TReRLDJiNiPwW6wG0DpnnBfkN9Lfxe3l4Wnv7phYoSCnQdBNs4KCExJ6j60SsyNnA/kNa ElEkNl2j7DxYSJ+5BfovArTkJLu2VdA+VPdxWwkVQJA1mBYZVT4l8z4vglwaY94YmFtp+J hyzlBBRc+ULQx4YS+wAkR9sJaYMjOPU01JVXMDR/qdj7XtI04fwcxvo5lMyd8QPlgu8re1 m9/ZLTBcYoHQBYG/RI+9NZyJjLUV5b6vaXHUyXbtf60nvfnJUoGU1daPJocVeA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1695116705; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3d8xIsc4sePtutJqhd6WlEejexYZaNqODb5FCP/tcuA=; b=kXlTV/h8ELdleg5FiqV5XCQTp6WaYY6K4PlAQQhvofXi6oW85MdiFFPVnxYp0jFOk9QhFl PrTqS1s9aU3lL3CQ== From: "tip-bot2 for Josh Poimboeuf" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] x86/srso: Fix SBPB enablement for spec_rstack_overflow=off Cc: Josh Poimboeuf , Ingo Molnar , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: MIME-Version: 1.0 Message-ID: <169511670491.27769.1578583529325282203.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 19 Sep 2023 02:45:36 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777469494677980278 X-GMAIL-MSGID: 1777469494677980278 The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 01b057b2f4cc2d905a0bd92195657dbd9a7005ab Gitweb: https://git.kernel.org/tip/01b057b2f4cc2d905a0bd92195657dbd9a7005ab Author: Josh Poimboeuf AuthorDate: Mon, 04 Sep 2023 22:04:48 -07:00 Committer: Borislav Petkov (AMD) CommitterDate: Tue, 19 Sep 2023 10:54:39 +02:00 x86/srso: Fix SBPB enablement for spec_rstack_overflow=off 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 --- 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 b0ae985..10499bc 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) {