From: "tip-bot2 for Sean Christopherson" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Sean Christopherson <seanjc@google.com>,
Ingo Molnar <mingo@kernel.org>,
Daniel Sneddon <daniel.sneddon@linux.intel.com>,
stable@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/urgent] x86/cpu: Disable BHI mitigation by default when SPECULATION_MITIGATIONS=n
Date: Wed, 10 Apr 2024 14:31:18 -0000 [thread overview]
Message-ID: <171275947899.10875.3224050314165203955.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20240409175108.1512861-3-seanjc@google.com>
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: e8f2ec1cc10e86adfc2089fb93a1158e69989bbd
Gitweb: https://git.kernel.org/tip/e8f2ec1cc10e86adfc2089fb93a1158e69989bbd
Author: Sean Christopherson <seanjc@google.com>
AuthorDate: Tue, 09 Apr 2024 10:51:06 -07:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 10 Apr 2024 16:22:56 +02:00
x86/cpu: Disable BHI mitigation by default when SPECULATION_MITIGATIONS=n
Rework the initialization of bhi_mitigation to use positive CONFIG tests
for the ON/AUTO cases so that lack of *any* CONFIG_SPECTRE_BHI_* #define,
i.e. when the kernel is built with CONFIG_SPECULATION_MITIGATIONS=n,
results in the mitigation being OFF by default, not AUTO.
Per the help text for SPECULATION_MITIGATIONS, the intent is that 'N'
disables all mitigations.
Fixes: ec9404e40e8f ("x86/bhi: Add BHI mitigation knob")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Daniel Sneddon <daniel.sneddon@linux.intel.com>
Cc: stable@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20240409175108.1512861-3-seanjc@google.com
---
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 27f5004..7e4a706 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -1630,9 +1630,9 @@ enum bhi_mitigations {
};
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 :
+ IS_ENABLED(CONFIG_SPECTRE_BHI_AUTO) ? BHI_MITIGATION_AUTO :
+ BHI_MITIGATION_OFF;
static int __init spectre_bhi_parse_cmdline(char *str)
{
next prev parent reply other threads:[~2024-04-10 14:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-09 17:51 [PATCH 0/3] x86/cpu: Fix SPECULATIVE_MITIGATION=n kernels Sean Christopherson
2024-04-09 17:51 ` [PATCH 1/3] x86/cpu: Actually turn off mitigations by default for SPECULATION_MITIGATIONS=n Sean Christopherson
2024-04-10 14:31 ` [tip: x86/urgent] " tip-bot2 for Sean Christopherson
2024-04-13 1:53 ` [PATCH 1/3] " Stephen Rothwell
2024-04-13 9:27 ` Michael Ellerman
2024-04-13 9:38 ` Michael Ellerman
2024-04-14 22:42 ` Stephen Rothwell
2024-04-15 11:16 ` Geert Uytterhoeven
2024-04-15 14:31 ` Sean Christopherson
2024-04-16 11:06 ` Michael Ellerman
2024-04-19 14:03 ` Will Deacon
2024-04-19 14:06 ` Sean Christopherson
2024-04-19 14:38 ` Will Deacon
2024-04-15 11:13 ` Geert Uytterhoeven
2024-04-09 17:51 ` [PATCH 2/3] x86/cpu: Disable BHI mitigation by default when SPECULATION_MITIGATIONS=n Sean Christopherson
2024-04-10 14:31 ` tip-bot2 for Sean Christopherson [this message]
2024-04-09 17:51 ` [PATCH 3/3] x86/cpu: Ignore "mitigations" kernel parameter if SPECULATION_MITIGATIONS=n Sean Christopherson
2024-04-10 14:18 ` Ingo Molnar
2024-04-09 18:55 ` [PATCH 0/3] x86/cpu: Fix SPECULATIVE_MITIGATION=n kernels Daniel Sneddon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=171275947899.10875.3224050314165203955.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=daniel.sneddon@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=seanjc@google.com \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®