Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp258023lqg; Thu, 11 Apr 2024 01:40:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVM88HUzTmJe80gshCcFj9zrCTX1v8mCZRRriH3GI/9ReKXMxwXhZylvyfOBi9AWqIas7j8YYfqzQFMRu8c6FAzRQizJoER+8SfkAmWtg== X-Google-Smtp-Source: AGHT+IEeGTMHLQlaa0Fs7Hg5T4LdN6n6ng80cZlAV5HwEg7/P89UptASVCh6bnbhP+yKc1XSO0qa X-Received: by 2002:ad4:5aa4:0:b0:69b:2675:e466 with SMTP id u4-20020ad45aa4000000b0069b2675e466mr6320182qvg.29.1712824840350; Thu, 11 Apr 2024 01:40:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712824840; cv=pass; d=google.com; s=arc-20160816; b=oymoUglEvQtDDkIx0b681vLH1oV/6q5lq6s5VeMuA02Kbdjm3EkqpkNGX/DTgc64K6 68GIvZTYC6Od6pYLhisPydFOwF6Jh5z6ZbphIhSR2Rv2FdHCaqWXM4P7WvCDxmuj0ixA 3Pj/6Eh4uKwkzxnP2f/WZuNMp+1Ir32rsyoJVW1PVgL8lt/BmpAy/Na0KhsIjWUscWaK 8C/iO+Od98MVl3dWMMCeb7dzb4CK6womhmxHmIOr4g4K+RaL+mhklw/IexW3BoS4ilGn iqsrrsZu00h+JfpMbLQGs6gPmLYmHlTMaLryzY1gvPpdYcYoDXshGCltjNFcQooVhsOt N7HQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=0OIrgyGKdkz4FkXLmqF5I6KkItnIymqiD+4amwsXRYM=; fh=ws25XhMZ9qpx9snk5IAEAdPB9aOE3Zswk8PKMqIkRxY=; b=SMhLw0BRIzygKOinuM0nF59gw7uolr2YiKcF28hG02pG3fqLmnnXMRIY4kmfzNwrve g8/LhEK04NiWMklR+Xc7kFU+8PScCdAyq0ElX8r8a+g+msWpddCD5mfyEveNrKHxGZr8 B4AM4EeK8dD3xUHf07P0Hb1jmFqaP1zNUDpOdZKWBtfmlaej3+a+htK6iM+EAAngh37X N1G3IO9wriw7vCx2NlnxlD/lS5Lx2uwgznvvBYiKpbE75TdUYtrGgV3LM9XhnGlh1e4O iJ3AVPmKyBqboM2wkwLI22yQg1FQZpVUEYZIfb5sPpIeknudnTzcD5T96+VOdfqili1j THXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=aLYziSQD; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-140103-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140103-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i18-20020a0cf112000000b0069936018655si1072464qvl.262.2024.04.11.01.40.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 01:40:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140103-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=aLYziSQD; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-140103-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140103-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 02B441C21210 for ; Thu, 11 Apr 2024 08:40:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A02114263A; Thu, 11 Apr 2024 08:40:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="aLYziSQD"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="6Ubnzp8k" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A522E13D258; Thu, 11 Apr 2024 08:40:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712824829; cv=none; b=pSF9L8bq0e97Kxj/6OU1CZOXPrcertBK13aQq2KRcSiB4mEtYjo4eIWU16Dmr+nGiGGxYpKNFjtnUaKsKpDh4cM0hfp0F1Ud8bY7Pqmr+tUav4fTie5lf034JcvJ8Ma3Bli9YMYvqCiWVRGZhhLPE7EMG/EAJu7A+2+M661ensQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712824829; c=relaxed/simple; bh=CpA8HDZqXXQ38fRd4vjOjms0WE737KK96vUWC9UtX9w=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=iHtqhtrBq+bXsgnV8SxRGjGIGsgADw8z3pQA0vKVcTMOVd2u14mZWTvMK6NT0kmsbhsDIvE5KWcCkcyq4QmE0m+hEAChirBv49OPQeoYqx+R1bSIs3/NwyeD8qHlbekVnqspZ5Hn24nrWlTv8zsooDX73rlxkkSefg3N1JYqc8k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=aLYziSQD; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=6Ubnzp8k; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Thu, 11 Apr 2024 08:40:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712824819; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0OIrgyGKdkz4FkXLmqF5I6KkItnIymqiD+4amwsXRYM=; b=aLYziSQD2y3X/UyhKVEH1tnotTks9aTQEvGPJGojlljzBxNTENkCw5UYVy2avuT/i2z3W/ hZO2/i/gIr6tBzcHbUz5vsyFEOmd33Q2FeYd4BzCVffx+8NgRULNzU39kDAFDcOPKXk9HQ WcTcUgJbasjfgBONS1S3VbP2panW0h00q/XEBi2HO3NfDZqNxArfQLTy+DRgLvbfCUwKWj jopWL1U0S+Qq8Mjp8rN/Xy/LXYIXKvj3BznlkapHYZa4K07lsG8qJs4OuJMeO/vsHkIlxB un/DY2tPsQoP0+LyttjDmcCjFtpBy6BU7c6zvFYpPtJ3RKya3wn5qWZwjNbZIg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712824819; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0OIrgyGKdkz4FkXLmqF5I6KkItnIymqiD+4amwsXRYM=; b=6Ubnzp8kl8i5BmnMOa26R+FKk0pJTkO6BCWyBpwJI96I35+TweMcvwncXruiziPpTP5k+t FYdkY2SjhyiaVfBQ== From: "tip-bot2 for Josh Poimboeuf" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] x86/bugs: Remove CONFIG_BHI_MITIGATION_AUTO and spectre_bhi=auto Cc: Josh Poimboeuf , Ingo Molnar , Nikolay Borisov , Sean Christopherson , Linus Torvalds , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <412e9dc87971b622bbbaf64740ebc1f140bff343.1712813475.git.jpoimboe@kernel.org> References: <412e9dc87971b622bbbaf64740ebc1f140bff343.1712813475.git.jpoimboe@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171282481898.10875.12090429528204914432.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 215bca01a67300ea884ce9302eaed53bcd1d996d Gitweb: https://git.kernel.org/tip/215bca01a67300ea884ce9302eaed53bcd1d996d Author: Josh Poimboeuf AuthorDate: Wed, 10 Apr 2024 22:40:50 -07:00 Committer: Ingo Molnar CommitterDate: Thu, 11 Apr 2024 10:30:34 +02:00 x86/bugs: Remove CONFIG_BHI_MITIGATION_AUTO and spectre_bhi=auto Unlike most other mitigations' "auto" options, spectre_bhi=auto only mitigates newer systems, which is confusing and not particularly useful. Remove it. Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Reviewed-by: Nikolay Borisov Cc: Sean Christopherson Cc: Linus Torvalds Link: https://lore.kernel.org/r/412e9dc87971b622bbbaf64740ebc1f140bff343.1712813475.git.jpoimboe@kernel.org --- Documentation/admin-guide/hw-vuln/spectre.rst | 4 ---- Documentation/admin-guide/kernel-parameters.txt | 3 --- arch/x86/Kconfig | 5 ----- arch/x86/kernel/cpu/bugs.c | 10 +--------- 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/Documentation/admin-guide/hw-vuln/spectre.rst b/Documentation/admin-guide/hw-vuln/spectre.rst index 5a39acf..25a04cd 100644 --- a/Documentation/admin-guide/hw-vuln/spectre.rst +++ b/Documentation/admin-guide/hw-vuln/spectre.rst @@ -669,10 +669,6 @@ kernel command line. needed. off Disable the mitigation. - auto - Enable the HW mitigation if needed, but - *don't* enable the SW mitigation except for KVM. - The system may be vulnerable. For spectre_v2_user see Documentation/admin-guide/kernel-parameters.txt diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index a3874cc..902ecd9 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -6072,9 +6072,6 @@ on - (default) Enable the HW or SW mitigation as needed. off - Disable the mitigation. - auto - Enable the HW mitigation if needed, but - *don't* enable the SW mitigation except - for KVM. The system may be vulnerable. spectre_v2= [X86,EARLY] Control mitigation of Spectre variant 2 (indirect branch speculation) vulnerability. diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 10a6251..b63b676 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2651,11 +2651,6 @@ config SPECTRE_BHI_OFF bool "off" help Equivalent to setting spectre_bhi=off command line parameter. -config SPECTRE_BHI_AUTO - bool "auto" - depends on BROKEN - help - Equivalent to setting spectre_bhi=auto command line parameter. endchoice diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index b4ec0f0..0494787 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -1625,13 +1625,10 @@ static bool __init spec_ctrl_bhi_dis(void) enum bhi_mitigations { BHI_MITIGATION_OFF, BHI_MITIGATION_ON, - BHI_MITIGATION_AUTO, }; static enum bhi_mitigations bhi_mitigation __ro_after_init = - IS_ENABLED(CONFIG_SPECTRE_BHI_ON) ? BHI_MITIGATION_ON : - IS_ENABLED(CONFIG_SPECTRE_BHI_OFF) ? BHI_MITIGATION_OFF : - BHI_MITIGATION_AUTO; + IS_ENABLED(CONFIG_SPECTRE_BHI_ON) ? BHI_MITIGATION_ON : BHI_MITIGATION_OFF; static int __init spectre_bhi_parse_cmdline(char *str) { @@ -1642,8 +1639,6 @@ static int __init spectre_bhi_parse_cmdline(char *str) bhi_mitigation = BHI_MITIGATION_OFF; else if (!strcmp(str, "on")) bhi_mitigation = BHI_MITIGATION_ON; - else if (!strcmp(str, "auto")) - bhi_mitigation = BHI_MITIGATION_AUTO; else pr_err("Ignoring unknown spectre_bhi option (%s)", str); @@ -1682,9 +1677,6 @@ static void __init bhi_select_mitigation(void) setup_force_cpu_cap(X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT); pr_info("Spectre BHI mitigation: SW BHB clearing on vm exit\n"); - if (bhi_mitigation == BHI_MITIGATION_AUTO) - return; - /* Mitigate syscalls when the mitigation is forced =on */ setup_force_cpu_cap(X86_FEATURE_CLEAR_BHB_LOOP); pr_info("Spectre BHI mitigation: SW BHB clearing on syscall\n");