From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01D83EE49B0 for ; Fri, 25 Aug 2023 07:02:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242852AbjHYHC0 (ORCPT ); Fri, 25 Aug 2023 03:02:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242133AbjHYHCK (ORCPT ); Fri, 25 Aug 2023 03:02:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B8A3D3 for ; Fri, 25 Aug 2023 00:02:08 -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 2DC3063D4D for ; Fri, 25 Aug 2023 07:02:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C53AC433CB; Fri, 25 Aug 2023 07:02:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692946927; bh=OZJMVQjZTi/e/s9nHO1upSPDYbGcZBjeRCtvUGGaw7g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YxB05cVY51XGW4e48q82T++dAcsoeLcgO+nZ5KBLC74Fhv89Eq+EWqqUZkZ4/+HgL 7VjnnwlLDhHPRJLAPT82XBG1gw9tsvkPcMa5ezAxel8+Fnqnu9v/gkgFAt5k7oVuRo NmKetMwJxyvRrPRrIv43jeb2tF++6guejyHJWjb/JeaSJmv8mZTfMfms0ya6Qo9iUC 9gYFD7FtpkxiaPyFsOZYbkrPOYhpVhdDEobtpqNcNlgL47JTh/Qx2RsciENyvbX00p Rnya4euEbJy5KgBC/Zq9m46sMFCse+1Md7IVahgADhGFTV0WOMoV4T5nX8tyhpBpJi T4EvWK+E/8ezQ== 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 09/23] x86/srso: Print mitigation for retbleed IBPB case Date: Fri, 25 Aug 2023 00:01:40 -0700 Message-ID: <1f2f2257abc4047c707d0b8dbbd8e796730597f6.1692919072.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 mitigation in the usual format instead of a custom error message. Signed-off-by: Josh Poimboeuf --- 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 235c0e00ae51..6c47f37515b8 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) && -- 2.41.0