From nobody Sun Jul 12 04:27:18 2026 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 B88EC2EAE5; Thu, 11 Apr 2024 08:40:26 +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=bwZboWriTd8/Yfa3haANnK6QB/KNeR9c3DReo6fAqInReJ3ATFOw74D2FWVctCoYpNRJfY0upxyrd4h8Wmv5zHw+3yD8tWI3LRrAQ6AjLlTPiSrH5yKV+YKtX2Xk3A5kljkkSHuwZWazLY0y/RhD2VmO+HkzWk5uvpSlnbuadFo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712824829; c=relaxed/simple; bh=EKkU0vakLNZCApeEGiFYhFRmuY4Ff4FNPFAoAF64qsU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=rYAMStKS3AHyirFo2MAyEOPeXK/C/N2NWNEMtLbJ2tq37JBziP2NuOEJXsYcE8XmyIEfRKh+h8nV1rPFJQ28ITHvhS/xuVocMTKdmE5xSR/7FMgqhy+O37++r59n+PdBkVR5HVEIwiTpZ2NzKxjzcNb92KiaO2xjCWmkyXdyGJ0= 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=zKTe2y5k; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=mW201AnM; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zKTe2y5k"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="mW201AnM" 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=TV4lGUvfwBKBZs0So2M2CaulVHj6EJWSlMyp6cjcgcs=; b=zKTe2y5kGB8QpwRNs5Ps9FTgkb0bffKMJ2HXWJSJbvT6cL3oQPRhIScpjb45pug1uJn0vk bR5UOdmGJWp0GnO1F1cRrPbQZvIWOYspsLGyZ8sTtqwv219IyeKsPgQBMco7cj5aYM6+JM LA5unPzyrxT6J2MiKXH+24d9mVAwL+7zyFweta583iSmMsKu1TOEPwI8ur23+lmXfeyqJ6 5s/nJdk5HdMAGW8IOL1CSTeJZTCE/QS4sSyQQHT9a0yViSP2dyJlASXR/g1TnHM+rcyw9r LXgb/uxdhq1tjtGow1tXkriwlHyFrQR/ggiM01CallAgZKKTCPXmrw/1amuY8g== 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=TV4lGUvfwBKBZs0So2M2CaulVHj6EJWSlMyp6cjcgcs=; b=mW201AnMK74SamCh5fAASdQEwaMEOA18SDSlTvb6HNH9a1J3FGTG44X5FUiCHkittOd23Y 1/Q77TxXb9FPdgAg== 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: Replace CONFIG_SPECTRE_BHI_{ON,OFF} with CONFIG_MITIGATION_SPECTRE_BHI Cc: Josh Poimboeuf , Ingo Molnar , Sean Christopherson , Linus Torvalds , Nikolay Borisov , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <3833812ea63e7fdbe36bf8b932e63f70d18e2a2a.1712813475.git.jpoimboe@kernel.org> References: <3833812ea63e7fdbe36bf8b932e63f70d18e2a2a.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: <171282481815.10875.1887182579071664403.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: quoted-printable The following commit has been merged into the x86/urgent branch of tip: Commit-ID: f3f51c5865a9ae1488a35d97338f9f3f548adfee Gitweb: https://git.kernel.org/tip/f3f51c5865a9ae1488a35d97338f9f3f5= 48adfee Author: Josh Poimboeuf AuthorDate: Wed, 10 Apr 2024 22:40:51 -07:00 Committer: Ingo Molnar CommitterDate: Thu, 11 Apr 2024 10:30:34 +02:00 x86/bugs: Replace CONFIG_SPECTRE_BHI_{ON,OFF} with CONFIG_MITIGATION_SPECTR= E_BHI For consistency with the other CONFIG_MITIGATION_* options, replace the CONFIG_SPECTRE_BHI_{ON,OFF} options with a single CONFIG_MITIGATION_SPECTRE_BHI option. [ mingo: Fix ] Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Cc: Sean Christopherson Cc: Linus Torvalds Cc: Nikolay Borisov Link: https://lore.kernel.org/r/3833812ea63e7fdbe36bf8b932e63f70d18e2a2a.17= 12813475.git.jpoimboe@kernel.org --- arch/x86/Kconfig | 17 +++-------------- arch/x86/kernel/cpu/bugs.c | 2 +- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index b63b676..4474bf3 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2633,27 +2633,16 @@ config MITIGATION_RFDS stored in floating point, vector and integer registers. See also =20 -choice - prompt "Clear branch history" +config MITIGATION_SPECTRE_BHI + bool "Mitigate Spectre-BHB (Branch History Injection)" depends on CPU_SUP_INTEL - default SPECTRE_BHI_ON + default y help Enable BHI mitigations. BHI attacks are a form of Spectre V2 attacks where the branch history buffer is poisoned to speculatively steer indirect branches. See =20 -config SPECTRE_BHI_ON - bool "on" - help - Equivalent to setting spectre_bhi=3Don command line parameter. -config SPECTRE_BHI_OFF - bool "off" - help - Equivalent to setting spectre_bhi=3Doff command line parameter. - -endchoice - endif =20 config ARCH_HAS_ADD_PAGES diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 0494787..25111ad 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -1628,7 +1628,7 @@ enum bhi_mitigations { }; =20 static enum bhi_mitigations bhi_mitigation __ro_after_init =3D - IS_ENABLED(CONFIG_SPECTRE_BHI_ON) ? BHI_MITIGATION_ON : BHI_MITIGATION_OF= F; + IS_ENABLED(CONFIG_MITIGATION_SPECTRE_BHI) ? BHI_MITIGATION_ON : BHI_MITIG= ATION_OFF; =20 static int __init spectre_bhi_parse_cmdline(char *str) {