Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp813880rdb; Fri, 25 Aug 2023 01:40:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfQ5Fh9mUOdm01eyIxdie7EJAyN9kYa5X9zab6kwyOxpuQ/ahan+pvGDpyhUpQVbak5ESj X-Received: by 2002:a17:906:7493:b0:9a1:ca55:b668 with SMTP id e19-20020a170906749300b009a1ca55b668mr7587171ejl.59.1692952799962; Fri, 25 Aug 2023 01:39:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692952799; cv=none; d=google.com; s=arc-20160816; b=xX+v46MJRQMKb/N9NxuyMPOcaT1ERZdC3oF+N13wXxNJX0us4ksjw5mYWbeRyK+PdY Y5spC+baPiUj+B6age3VzRoUtx6MJ9EqMmvvu3sntelgIzpglF70ohQYc6ZEYjeDry47 sA5mms3O6zq8WFPBpbSdGDnZtLi8mFplq496zW9b2A0DGJK2GQfnYATKCXEO793ibjKx kFny7iV9okvAZiL9ABgy5wJnxPuKSqPFN3wonPuF/e0RBpvge1dAKfanKCqH6mvSBhmx iQip0Bz3EudldhB4PoGXxRlPr1QlZDD0eQYmi0QUZWWiXDglFJiPtFo2uEXlUQ1hbOqm jgnw== 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=XAFMt6wQfmPjBvQTKMdOjMRjm43WgPjg6nn6cGDoQb4=; fh=ZwaEcDYNCnlh+U7YxZ1LCEcet9pcdhSkEX0cCEOksvY=; b=0sxksApubomqcL55EMkbEpCbCpOPU0Q1dx/QVv+cZeB0IT6zfRrPmdyq6ZYlC3ia/6 OMFhSxOORa+GesdWugdTQiP7Hfit8YFyhDPQKAmLGJ5cNuckPrc+JFuI/bOM0llMnYu/ 1+Fml3/eB3DIVqsnCwpMNK9E5JZAgvIfUvrndbruH++boEysQXs80IOxv5q/892VLHtA gXjzgD/mAuY87U1aHq8bZEahTtT2odQrG3YMKAgtHEtIxzBfHHlzq4ndITxDVbcxfwxd hn83H3O8yYszAxsO+xoLcpmHqwGdWACVkSwZvoEWebAUm9W74xy7+JPB7S2kW6VJpevt Q31Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YxB05cVY; 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 d17-20020a170906371100b00987b20b66bbsi726900ejc.711.2023.08.25.01.39.28; Fri, 25 Aug 2023 01:39:59 -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=YxB05cVY; 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 S242842AbjHYHCZ (ORCPT + 99 others); Fri, 25 Aug 2023 03:02:25 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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 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