From patchwork Tue Sep 19 09:53:14 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: 142012 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp3564535vqi; Tue, 19 Sep 2023 10:37:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFRWfDUWeInhIDc00onhorCUcCzBXgWf6HU9IEAyTlidKY5mys67241AHtUhCQZUFP0y5+y X-Received: by 2002:a05:6a00:b82:b0:690:d620:7804 with SMTP id g2-20020a056a000b8200b00690d6207804mr391111pfj.13.1695145054327; Tue, 19 Sep 2023 10:37:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695145054; cv=none; d=google.com; s=arc-20160816; b=vgevHox6pzBZCnGVQc2cVZisVYpLb9iHpbao1VOUqMdFTZ9P1dur/2ySGemKq8SdpT vOS8Mco33tukz3XCx2QieqDI6BVYsNU1zWSCxNzHFAkyRmNJZRzsIoNNwPSC6nf0RwXy Z/IcDwNycBf95PjSi1B2r4wqTFom5Ka/5HYA435eANf0NBslw1sp20srne0hv6R1dr6J rht92kSls4eDxVPZNPJKxRKaip34o7turLLziBDwnlr/CjxSBLMCtGua0TVD4qFKE9JH ELJY/o5imrOfxOM7NQmZ3OirKi1Q2lJztfN4ToJQRTo/4srmXNKvNVMsW/juBQ0gPO+w 00Hw== 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=kRid2LK3qEac8qjy85RFIAwdbfs+iLAW0ERxN/f+5h4=; fh=TJa98jjcJcAUyvo2yQiOqi+wukdLlQU80th5XskGe8U=; b=AwQD2AbVPjdFdHpUy6ctV+ldTh3HVdbCjeXwSMXEbVCIfGJ7EIptJx2838aTFgC4mN CiTMUu+096PlNc+lFNb3DoNlREKn188Bn6wSYe27tUsb+1veoXvQOymDBL/aZ6r9LtoK CChHZJyFI0le5PWr+6qFaWVjY5hVkeqk+YCHRTRrsjj8Q0g8wkHv6v+UZl6x4xCbNWg0 soQR0hkA/vQ9eYFB3h/VRW4uHxO6Z+jE+Cgqx5pVO9DtW5pZHNY8mSxTbNiqtzVdIzbT YSOm4MEVUuAq1wRRmZGWHjULEr0+hfUH/2J/nNXRdIvbJQ/qGV+cXauLvsnw9Y7Qa3tb pmoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KCxwmL4y; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id a63-20020a639042000000b00578c64433cdsi841535pge.895.2023.09.19.10.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 10:37:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KCxwmL4y; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 74AA6806D7C0; Tue, 19 Sep 2023 02:55:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231991AbjISJyT (ORCPT + 26 others); Tue, 19 Sep 2023 05:54:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231777AbjISJxX (ORCPT ); Tue, 19 Sep 2023 05:53:23 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83BDA12B; Tue, 19 Sep 2023 02:53:16 -0700 (PDT) Date: Tue, 19 Sep 2023 09:53:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1695117195; 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=kRid2LK3qEac8qjy85RFIAwdbfs+iLAW0ERxN/f+5h4=; b=KCxwmL4yzRC2pGx2lis6EpUr70kXA4rZSPMVXJ1rLV1TMHxDiASCr9QnZ54Mn/m29HEiYV bUIiUFlVcLpAI99GoyVTOzOCApAHY5mXZWFMYNisAydFquFCg9/KGVLhJDLKC4omX0wC8S xh6CwLU56V9pOAtsn22XC6eebNHXhUmWIFZyoQ9ds4XQ+p6D1o3eiC/1cj56tRJnud1xoW k8D23xHh/SsWM5HD0CVELpfapk1Dv5fewuOJ62gJgGadbl5j6ZYIBC2cBo+PEp8Xrht1Ut YMYuJ5weGsJrjcKLvB9Pqu80i8hTA2txMKYjE2Fs3F1+ggl2s9xYu+jLeydQ3Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1695117195; 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=kRid2LK3qEac8qjy85RFIAwdbfs+iLAW0ERxN/f+5h4=; b=NgGObuAie86HIq7mf9pIwH66N+/V/ibGc88+CwfMQcky6FVNCnjqQhgqv/zIEUwwLMNP/C lSNzCbZKuiQOASDA== 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: <169511719449.27769.9404090787517473617.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Tue, 19 Sep 2023 02:55:25 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777488420390080099 X-GMAIL-MSGID: 1777488420390080099 The following commit has been merged into the x86/bugs branch of tip: Commit-ID: 6988c6ceccb03bb29723bbf5645f7f5ab0658816 Gitweb: https://git.kernel.org/tip/6988c6ceccb03bb29723bbf5645f7f5ab0658816 Author: Josh Poimboeuf AuthorDate: Mon, 04 Sep 2023 22:04:51 -07:00 Committer: Ingo Molnar CommitterDate: Tue, 19 Sep 2023 11:42:47 +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) &&