Message ID | 3836b2e27c9537d95ecce2a1e33e53315176ebc1.1692580085.git.jpoimboe@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp2742200vqi; Sun, 20 Aug 2023 19:11:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFXhkSojc/mqTORaxpHyg0seG94SWVLGMZHXDrYqo9jW0FjFs16wKwqyD7C6BY9hFt44fnV X-Received: by 2002:a17:90a:708f:b0:268:13e2:fc91 with SMTP id g15-20020a17090a708f00b0026813e2fc91mr2722049pjk.31.1692583880247; Sun, 20 Aug 2023 19:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692583880; cv=none; d=google.com; s=arc-20160816; b=J/+II+mvDTFuyk78bcx2SK1EvKN7+gRUtvEwFLYtgAVoz5ZoxwpwJGbQDy2Use/Mhz 0+t3QEjMvR3aoWGG9ifu+kRuF7EaOpdRDbEtE2si6UnX4eV4qqG8UJmT6ZgXlZBk1HeL 628vEdAGmx4Agwld+Gzp/+CH9yyIF528ji/W8/o3j7x9gNR49Hfoe3mQB6EoeKLR6lZH qAwF/hF0csr1cAM60cnuu36uChVpaozGEvSQsQ3VkWvm6KQE0BLbo1b0jcqgi/fjvbp4 mBFkS1xY7HtEs0T0+/9hzjkNnHY+bCRnueHsbwaFf8scWQrnx5L5ydgPUNJAoqa/JO3T aczw== 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=S4HaWZn1/rhEF5sgIsF6cDMNQYa/3qC43R+TOrUCEfA=; fh=1KVrD/LnRsN9N7k2d12iARV4DA2tVMW012QtKSrD46c=; b=KNEdpxpsm81mLUM0RST441hTC9GzIiiiSx0EC4psh6OnS1kfz25PP2B4+jzYilEJ+q 1tiUYDce6VLzXhsbxpIAZUQ4yiO2AhjcLD2aHTuz96oPEe4fOtz/VgsQoMudvEg2pc1F IAPbnEnIGdl+bQoZlBqWqCP+WQSjoa6OYQfnQ7JfrzYAAYwNobSWZ5mmMSeJbaOOhBXZ HfEy8XEo1l0aT62HqfNQCKxTQmC05twxUigbi2WNSjpT7mqP0K26/4eg59+8I4kcW6J/ NsV6xkgh7eddOYZDwMpRucUqbxm/xyc6q1Ctj/gkVWX1hUIzMo4uFZ1bHee1e5O8v3hj zgMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K7nvPO6Q; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d3-20020a17090ad98300b0026d42d35d5csi5925494pjv.78.2023.08.20.19.11.00; Sun, 20 Aug 2023 19:11:20 -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=K7nvPO6Q; 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 S232127AbjHUBTs (ORCPT <rfc822;chiang.bai@gmail.com> + 99 others); Sun, 20 Aug 2023 21:19:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232298AbjHUBTg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 20 Aug 2023 21:19:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26B51AB for <linux-kernel@vger.kernel.org>; Sun, 20 Aug 2023 18:19:34 -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 B918962625 for <linux-kernel@vger.kernel.org>; Mon, 21 Aug 2023 01:19:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B17D4C433D9; Mon, 21 Aug 2023 01:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692580773; bh=sQtvE37xPNADIY4OH0L1Ahw3y/Y1U2QJcyLmdprUEYM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K7nvPO6QyQ4FnLPVo6C33788s2jlyehOdGQ6J5bjIlgOiRPV7F8CeVEr0gKiLAgsz gqICzXsnPAXNcI4gj1XgJ7qlLHlo2+IiLEETpaE1WzTa2dT1QW7iuY6F5vMy5mMcTp rwagEeKPpgA2jmVtKmvW5xOQmcrb+zfdLKN/towjobDAjqXkFIpu7ymmY20lVhH4Se SJxWoe3l+sHJYmnk3m+2O5GHmmUJY7N/0talOUh0o3ObGMQuvK9nVaOYye8BoAMzpX HQJb3FJ0HctEp5I6qN7NoKCw10XiV/akk7XUFApKBw424thH8PHsg5W2m/q9YLo4rc PK3vcoIUaHITA== From: Josh Poimboeuf <jpoimboe@kernel.org> To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Borislav Petkov <bp@alien8.de>, Peter Zijlstra <peterz@infradead.org>, Babu Moger <babu.moger@amd.com>, Paolo Bonzini <pbonzini@redhat.com>, Sean Christopherson <seanjc@google.com>, David.Kaplan@amd.com, Andrew Cooper <andrew.cooper3@citrix.com>, Nikolay Borisov <nik.borisov@suse.com>, gregkh@linuxfoundation.org, Thomas Gleixner <tglx@linutronix.de> Subject: [PATCH 10/22] x86/srso: Print mitigation for retbleed IBPB case Date: Sun, 20 Aug 2023 18:19:07 -0700 Message-ID: <3836b2e27c9537d95ecce2a1e33e53315176ebc1.1692580085.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <cover.1692580085.git.jpoimboe@kernel.org> References: <cover.1692580085.git.jpoimboe@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774802834963893186 X-GMAIL-MSGID: 1774802834963893186 |
Series |
SRSO fixes/cleanups
|
|
Commit Message
Josh Poimboeuf
Aug. 21, 2023, 1:19 a.m. UTC
When overriding the requested mitigation with IBPB due to retbleed=ibpb,
print the actual mitigation.
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
arch/x86/kernel/cpu/bugs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index da480c089739..4e332707a343 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -2427,7 +2427,7 @@ static void __init srso_select_mitigation(void) if (has_microcode) { pr_info("Retbleed IBPB mitigation enabled, using same for SRSO\n"); srso_mitigation = SRSO_MITIGATION_IBPB; - goto out; + goto out_print; } } @@ -2487,7 +2487,8 @@ static void __init srso_select_mitigation(void) break; } - pr_info("%s%s\n", srso_strings[srso_mitigation], (has_microcode ? "" : ", no microcode")); +out_print: + pr_info("%s%s\n", srso_strings[srso_mitigation], has_microcode ? "" : ", no microcode"); out: if (boot_cpu_has(X86_FEATURE_SBPB) && srso_mitigation == SRSO_MITIGATION_NONE)