From patchwork Sat Sep 23 12:20:11 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: 143948 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp271490vqu; Sat, 23 Sep 2023 09:38:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnJQGXTWUsUgj+zQW+z2asFnirYjuzQ+5bdaCUQk8ikLbH7zy/3ANJbwh5fc650up0HAju X-Received: by 2002:a17:902:ab01:b0:1b8:66f6:87a3 with SMTP id ik1-20020a170902ab0100b001b866f687a3mr2225339plb.52.1695487130161; Sat, 23 Sep 2023 09:38:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695487130; cv=none; d=google.com; s=arc-20160816; b=VKR9PAvhM5ua518rLmKtUvFq1HcmfIGhUYapczS+uwPbGfYYGxCioXmgIk/7MvvHz7 xhD2Y4/7uOmEtQFRP2KGwLs8reZtqbSN8cTl8JZVckxUJdT6d3830b3KDW1Ka9hq91a3 bdgTvxwQirc1nFvJgFaFjK4Fl6/a7FwWQ1BKTC96x1kYTgoodG9E7BWoWigN/uUkrTDD /X8WgY3bbO1N37fWwLv0akQLQmlwfFNghSyEquTn734C/lZmk2gjy98D+P4E8ZgHE+93 w2KKmLsk/dmO7CSmS8tis9XLPpL0FC9ifwcGaP4TvT8CR5OSjzOEPXEWrshsXjXZZD6B mVPQ== 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=wUHBMA9vy8RdqlVkVInBTvLqhO6QzlRxLsLW64rgEYE=; fh=TJa98jjcJcAUyvo2yQiOqi+wukdLlQU80th5XskGe8U=; b=V/9yBiJKt8Pi0Kj4BDNCJS8QpkxiDupF1QHNXYAgkdtMFZcAXussgL45rOwCwMT7bd wOjatCtr4jITToBOJd1ifocGoVNS+c+kobSvAxpQgDn1kKb56lnNB1KjoQqfoEc1rsPy CfqWw3gwstsRS3KrZOpIZUYYHnyu/hYVTG4fBakIVRFbKecKP0PdRN9RD5PeoUjJeVCR GEh8X6rRF5WJmrBOeldGPRyhUMRyUwPBNBw0KfjD1yhqvHeID4XsLKd3JvR1xzpfrgEu cPoep8r8odKRYOz0a4u9fbne7pZ9FCsE5czuiEKdQxIGNYwNnx68GtfhCucnkOttpVZm Guaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=XvMZDSc0; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id kg14-20020a170903060e00b001b89b1bae72si5929622plb.528.2023.09.23.09.38.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 09:38:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=XvMZDSc0; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 0C1BC807CED7; Sat, 23 Sep 2023 05:22:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231861AbjIWMU7 (ORCPT + 29 others); Sat, 23 Sep 2023 08:20:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231686AbjIWMU3 (ORCPT ); Sat, 23 Sep 2023 08:20:29 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D72B51B1; Sat, 23 Sep 2023 05:20:13 -0700 (PDT) Date: Sat, 23 Sep 2023 12:20:11 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1695471612; 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=wUHBMA9vy8RdqlVkVInBTvLqhO6QzlRxLsLW64rgEYE=; b=XvMZDSc02TvLhacFQMcwteZCNhXhdKRvYBD7EOJXT0JKTl3qG5IMfK97eRef48PzzehokD /jEeBfLWlRlOo5o1ZV6ObYpjrdKvWByOQ1ZVNrxPwkjVSXBY9gxqrCx4vSSXEptWomQ9tf KsHyJ5/HyOSKqi8OFql0F1nZKyrsgIUzSAfWJEhA1bRj0G54UzvcgUwEOAMVBzc3Lha09l /N/oWZd6bty/gPWvE6TvvQits4gK07XJQO+diaiorRJrU5B7+JvLyFKeysdNzQ3bpP0svq YF0u/7Z0adIPwivgcuIzBGiIoqXCpSsFKDyqQMdimvbpnbN9jEiIDkAP+4P1rg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1695471612; 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=wUHBMA9vy8RdqlVkVInBTvLqhO6QzlRxLsLW64rgEYE=; b=QIgP5va3clsSmm34MgsESxgDCnlT4jAzK3pw9ekaVCxz8ejXSgJu+DMge1RAvB0eW1Lxgw dYMvjyJB8I7CziCg== 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/bugs] x86/srso: Print mitigation for retbleed IBPB case 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: <169547161190.27769.8155574985586985475.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Sat, 23 Sep 2023 05:22:00 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777488420390080099 X-GMAIL-MSGID: 1777847113281442878 The following commit has been merged into the x86/bugs branch of tip: Commit-ID: 8e7f2ef76ed2360dabe3ccd253042f9f9054db65 Gitweb: https://git.kernel.org/tip/8e7f2ef76ed2360dabe3ccd253042f9f9054db65 Author: Josh Poimboeuf AuthorDate: Mon, 04 Sep 2023 22:04:51 -07:00 Committer: Ingo Molnar CommitterDate: Sat, 23 Sep 2023 14:13:02 +02:00 x86/srso: Print mitigation for retbleed IBPB case When overriding the requested mitigation with IBPB due to retbleed=ibpb, print the mitigation in the usual format instead of a custom error message. Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/ec3af919e267773d896c240faf30bfc6a1fd6304.1693889988.git.jpoimboe@kernel.org --- arch/x86/kernel/cpu/bugs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 235c0e0..6c47f37 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -2425,9 +2425,8 @@ static void __init srso_select_mitigation(void) if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) { if (has_microcode) { - pr_err("Retbleed IBPB mitigation enabled, using same for SRSO\n"); srso_mitigation = SRSO_MITIGATION_IBPB; - goto pred_cmd; + goto out; } } @@ -2490,7 +2489,8 @@ static void __init srso_select_mitigation(void) break; } - pr_info("%s%s\n", srso_strings[srso_mitigation], (has_microcode ? "" : ", no microcode")); +out: + pr_info("%s%s\n", srso_strings[srso_mitigation], has_microcode ? "" : ", no microcode"); pred_cmd: if ((!boot_cpu_has_bug(X86_BUG_SRSO) || srso_cmd == SRSO_CMD_OFF) &&