Received: by 2002:a05:7412:1492:b0:e2:908c:2ebd with SMTP id s18csp179279rdh; Mon, 21 Aug 2023 11:16:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGb88qaTLFqOYGDSNIQ0ggcLJAL0kl7Zkynu2huwjpKZabJZpZn4Iq5N1EflEG1lgKPSCcy X-Received: by 2002:a2e:8808:0:b0:2b6:e292:85ab with SMTP id x8-20020a2e8808000000b002b6e29285abmr5620447ljh.25.1692641810446; Mon, 21 Aug 2023 11:16:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692641810; cv=none; d=google.com; s=arc-20160816; b=IidGDCCnRZa8p7NnjGYdLT1CZorWryDsMvG9OqXEEaa6iK/P5gRr42ZW1oImKUMp0T BlyA4SIxspVw/5+sSOA7kr6AvFqgyIyj3z/jwlJF0ooIb8Op10+bBfOoB2hW/yAJEAJI 6CjKfIu+G7+P0n1MPxfjhcxdOKcePVym9TSVrcg+g7PbzLzaStliYQnkJ+Qb4X3GmEgx PoEHf6yIay0URKw/0RZs+2tolIBzz18bnYY5s3b+MrAbJXp1UZwdmpmjU4syo7RGqDLc /gOKfHXvPPbybyoNzjlWX1NCrV2woYcd+ez6lBaA2wdLsDXuD8RHQehgwkd23cm3U1F4 mscA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ot9-20020a170906ccc900b0099dea31e143si5538252ejb.528.2023.08.21.11.16.25; Mon, 21 Aug 2023 11:16:50 -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 S231609AbjHUBTr (ORCPT + 99 others); Sun, 20 Aug 2023 21:19:47 -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 ); 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 ; 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 ; 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 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 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: References: 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: X-Mailing-List: linux-kernel@vger.kernel.org When overriding the requested mitigation with IBPB due to retbleed=ibpb, print the actual mitigation. Signed-off-by: Josh Poimboeuf --- 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) -- 2.41.0