Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp1113095rdb; Sun, 20 Aug 2023 18:29:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEzddX01P6avac9nZl62j4FgA+o+EAFYxfpfC4zLaTlmi9CrkvhWi3AYWm2FFTBu8Zk1W5x X-Received: by 2002:a05:6512:5d4:b0:500:7efe:313c with SMTP id o20-20020a05651205d400b005007efe313cmr1057953lfo.24.1692581348571; Sun, 20 Aug 2023 18:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692581348; cv=none; d=google.com; s=arc-20160816; b=Ynvi0iwDIvQY2XnOt2IToBnUb8cs6n0pdmQ/PIhL9yg7ZiA4CxYpoJGD7aRV7o3RvP j26FHPQ8MLJbfKM4jcAZf2jQgNdCF+BZxe6gWJFHopSjHCG3JV7rItrVeZvpyRd9pfPK P+mdICusazH45u1Ofmy7MufgA+ipl31nRLyM36nRAPXcNWvybldr19S59lcsdoyd1SQR 3Tn71+xnecRxxQUCedynJ75WLgxLux/T8WGMlnf+UwvgECfTFC+RYMPI4XYdXc4S7oHo cd7d6o1Y/2y1EFi1mgng/AJvQhQYrBf4irmZGHVzxz0JX9mu3V+s0/Avh1ZU0L2M2SiC qDng== 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=s0MyYfbr/zSpDGwWfNM+i44fvpgkz/Dn8Ju/FDoOLXk=; fh=1KVrD/LnRsN9N7k2d12iARV4DA2tVMW012QtKSrD46c=; b=bg8XioPhgDbY0KyguZ6jaMEVxbwY8JHGCVxlhCkQ7OIwOJl5BxyHb9JpttTFWEwJMx QuHPfUTTrC2uNsi9E6FAdxeqxaSNUcrYfzW9G6y9Gtk83KBiz2S4Gcyb/Vt50A0f6Ibj yORXRljmMmAD82hQsk3sURX8uccWOSq8hEkIqEY5+j+6+Pret2Fg610fXaB4IHe5BRKt rZ7hO3I5POyuw4wFxHYm3oLoZxuzDh2DuUGmh0osHWi1CO7hduPPMo7Dv1hNAMrWqlwD rThlzqbwqlbrdEAsC9wbBG2C1hgPbFuHSjtNIXW1gmg1N7IgWWtUgEWD0tGXMA0YeFD4 MMTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=twdOzBuS; 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 d12-20020a50fe8c000000b00523ba10ab2bsi4769410edt.609.2023.08.20.18.28.43; Sun, 20 Aug 2023 18:29:08 -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=twdOzBuS; 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 S232333AbjHUBTl (ORCPT + 99 others); Sun, 20 Aug 2023 21:19:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232282AbjHUBTc (ORCPT ); Sun, 20 Aug 2023 21:19:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69B0BA0 for ; Sun, 20 Aug 2023 18:19:31 -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 499FA6260A for ; Mon, 21 Aug 2023 01:19:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 467B2C433C7; Mon, 21 Aug 2023 01:19:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692580770; bh=KnSxGMkMYqvVYSB4k0ly/1z4B47bW+EAymF48KXoKGs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=twdOzBuSlNbaNUhUJKLguFajHFuYhRj99egxZUqQbBAN93TX5JeOXCF+7NfpHI1f0 yUkLU2fn9rKUryEVu3QwMIsjJ5yftsBx3N/sgun+62ND9HOoFeTgNxqdiY2+LVXWjq I99XYW6BVnmek0yhxCMRGAFkT7o2bWmxa1gjy4JYCBEF6lvUqtQUmilBG2KqyLphD8 okqCa3QIfTNP38JH1G6C9erGMuxtYt0ItSDBtTSqge0nLX/NKpxQRJaB/0WhuOv8e4 2FrUGKda3ISIVPzQAN3qq3lrUcoGabfd3m5Ui3pwYy5uwW4wUPhuQGFCQBauwqYEaX 38bAZBjyow4+Q== 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 06/22] x86/srso: Print actual mitigation if requested mitigation isn't possible Date: Sun, 20 Aug 2023 18:19:03 -0700 Message-ID: <6eaaf0680dc8c57a5c61e9445b589169371f50a8.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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 If the kernel wasn't compiled to support the requested option, print the actual option that ends up getting used. Signed-off-by: Josh Poimboeuf --- arch/x86/kernel/cpu/bugs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index ff5bfe8f0ee9..579e06655613 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -2461,7 +2461,6 @@ static void __init srso_select_mitigation(void) srso_mitigation = SRSO_MITIGATION_SAFE_RET; } else { pr_err("WARNING: kernel not compiled with CPU_SRSO.\n"); - goto pred_cmd; } break; @@ -2473,7 +2472,6 @@ static void __init srso_select_mitigation(void) } } else { pr_err("WARNING: kernel not compiled with CPU_IBPB_ENTRY.\n"); - goto pred_cmd; } break; @@ -2485,7 +2483,6 @@ static void __init srso_select_mitigation(void) } } else { pr_err("WARNING: kernel not compiled with CPU_SRSO.\n"); - goto pred_cmd; } break; -- 2.41.0