public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, Josh Poimboeuf <jpoimboe@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Sean Christopherson <seanjc@google.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Nikolay Borisov <nik.borisov@suse.com>
Subject: [PATCH 6.1 64/69] x86/bugs: Replace CONFIG_SPECTRE_BHI_{ON,OFF} with CONFIG_MITIGATION_SPECTRE_BHI
Date: Mon, 15 Apr 2024 16:21:35 +0200	[thread overview]
Message-ID: <20240415141948.096683138@linuxfoundation.org> (raw)
In-Reply-To: <20240415141946.165870434@linuxfoundation.org>

6.1-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Josh Poimboeuf <jpoimboe@kernel.org>

commit 4f511739c54b549061993b53fc0380f48dfca23b upstream.

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 <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nikolay Borisov <nik.borisov@suse.com>
Link: https://lore.kernel.org/r/3833812ea63e7fdbe36bf8b932e63f70d18e2a2a.1712813475.git.jpoimboe@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/x86/Kconfig           |   17 +++--------------
 arch/x86/kernel/cpu/bugs.c |    2 +-
 2 files changed, 4 insertions(+), 15 deletions(-)

--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2563,27 +2563,16 @@ config MITIGATION_RFDS
 	  stored in floating point, vector and integer registers.
 	  See also <file:Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst>
 
-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 <file:Documentation/admin-guide/hw-vuln/spectre.rst>
 
-config SPECTRE_BHI_ON
-	bool "on"
-	help
-	  Equivalent to setting spectre_bhi=on command line parameter.
-config SPECTRE_BHI_OFF
-	bool "off"
-	help
-	  Equivalent to setting spectre_bhi=off command line parameter.
-
-endchoice
-
 endif
 
 config ARCH_HAS_ADD_PAGES
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -1605,7 +1605,7 @@ enum bhi_mitigations {
 };
 
 static enum bhi_mitigations bhi_mitigation __ro_after_init =
-	IS_ENABLED(CONFIG_SPECTRE_BHI_ON) ? BHI_MITIGATION_ON : BHI_MITIGATION_OFF;
+	IS_ENABLED(CONFIG_MITIGATION_SPECTRE_BHI) ? BHI_MITIGATION_ON : BHI_MITIGATION_OFF;
 
 static int __init spectre_bhi_parse_cmdline(char *str)
 {



  parent reply	other threads:[~2024-04-15 14:41 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 14:20 [PATCH 6.1 00/69] 6.1.87-rc1 review Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 01/69] smb3: fix Open files on server counter going negative Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 02/69] ata: libata-scsi: Fix ata_scsi_dev_rescan() error path Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 03/69] batman-adv: Avoid infinite loop trying to resize local TT Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 04/69] ring-buffer: Only update pages_touched when a new page is touched Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 05/69] Bluetooth: Fix memory leak in hci_req_sync_complete() Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 06/69] drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11 Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 07/69] PM: s2idle: Make sure CPUs will wakeup directly on resume Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 08/69] media: cec: core: remove length check of Timer Status Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 09/69] arm64: dts: imx8-ss-conn: fix usdhc wrong lpcg clock order Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 10/69] Revert "drm/qxl: simplify qxl_fence_wait" Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 11/69] nouveau: fix function cast warning Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 12/69] scsi: hisi_sas: Modify the deadline for ata_wait_after_reset() Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 13/69] scsi: qla2xxx: Fix off by one in qla_edif_app_getstats() Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 14/69] net: openvswitch: fix unwanted error log on timeout policy probing Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 15/69] u64_stats: fix u64_stats_init() for lockdep when used repeatedly in one file Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 16/69] xsk: validate user input for XDP_{UMEM|COMPLETION}_FILL_RING Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 17/69] geneve: fix header validation in geneve[6]_xmit_skb Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 18/69] bnxt_en: Reset PTP tx_avail after possible firmware reset Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 19/69] net: ks8851: Inline ks8851_rx_skb() Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 20/69] net: ks8851: Handle softirqs at the end of IRQ thread to fix hang Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 21/69] af_unix: Clear stale u->oob_skb Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 22/69] octeontx2-af: Fix NIX SQ mode and BP config Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 23/69] ipv6: fib: hide unused pn variable Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 24/69] ipv4/route: avoid unused-but-set-variable warning Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 25/69] ipv6: fix race condition between ipv6_get_ifaddr and ipv6_del_addr Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 26/69] Bluetooth: SCO: Fix not validating setsockopt user input Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 27/69] Bluetooth: L2CAP: " Greg Kroah-Hartman
2024-04-15 14:20 ` [PATCH 6.1 28/69] netfilter: complete validation of " Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 29/69] net/mlx5: Properly link new fs rules into the tree Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 30/69] net/mlx5e: Fix mlx5e_priv_init() cleanup flow Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 31/69] net/mlx5e: HTB, Fix inconsistencies with QoS SQs number Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 32/69] net: sparx5: fix wrong config being used when reconfiguring PCS Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 33/69] net: dsa: mt7530: trap link-local frames regardless of ST Port State Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 34/69] af_unix: Do not use atomic ops for unix_sk(sk)->inflight Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 35/69] af_unix: Fix garbage collector racing against connect() Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 36/69] net: ena: Fix potential sign extension issue Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 37/69] net: ena: Wrong missing IO completions check order Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 38/69] net: ena: Fix incorrect descriptor free behavior Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 39/69] tracing: hide unused ftrace_event_id_fops Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 40/69] iommu/vt-d: Allocate local memory for page request queue Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 41/69] btrfs: qgroup: correctly model root qgroup rsv in convert Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 42/69] btrfs: record delayed inode root in transaction Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 43/69] btrfs: qgroup: convert PREALLOC to PERTRANS after record_root_in_trans Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 44/69] io_uring/net: restore msg_control on sendzc retry Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 45/69] kprobes: Fix possible use-after-free issue on kprobe registration Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 46/69] drm/i915/vrr: Disable VRR when using bigjoiner Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 47/69] drm/amdkfd: Reset GPU on queue preemption failure Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 48/69] drm/ast: Fix soft lockup Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 49/69] drm/client: Fully protect modes[] with dev->mode_config.mutex Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 50/69] vhost: Add smp_rmb() in vhost_vq_avail_empty() Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 51/69] vhost: Add smp_rmb() in vhost_enable_notify() Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 52/69] perf/x86: Fix out of range data Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 53/69] x86/cpu: Actually turn off mitigations by default for SPECULATION_MITIGATIONS=n Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 54/69] selftests: timers: Fix abs() warning in posix_timers test Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 55/69] x86/apic: Force native_apic_mem_read() to use the MOV instruction Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 56/69] irqflags: Explicitly ignore lockdep_hrtimer_exit() argument Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 57/69] x86/bugs: Fix return type of spectre_bhi_state() Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 58/69] x86/bugs: Fix BHI documentation Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 59/69] x86/bugs: Cache the value of MSR_IA32_ARCH_CAPABILITIES Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 60/69] x86/bugs: Rename various ia32_cap variables to x86_arch_cap_msr Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 61/69] x86/bugs: Fix BHI handling of RRSBA Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 62/69] x86/bugs: Clarify that syscall hardening isnt a BHI mitigation Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 63/69] x86/bugs: Remove CONFIG_BHI_MITIGATION_AUTO and spectre_bhi=auto Greg Kroah-Hartman
2024-04-15 14:21 ` Greg Kroah-Hartman [this message]
2024-04-15 14:21 ` [PATCH 6.1 65/69] drm/i915/cdclk: Fix CDCLK programming order when pipes are active Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 66/69] drm/i915: Disable port sync when bigjoiner is used Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 67/69] drm/amdgpu: Reset dGPU if suspend got aborted Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 68/69] drm/amdgpu: always force full reset for SOC21 Greg Kroah-Hartman
2024-04-15 14:21 ` [PATCH 6.1 69/69] drm/amd/display: fix disable otg wa logic in DCN316 Greg Kroah-Hartman
2024-04-15 17:36 ` [PATCH 6.1 00/69] 6.1.87-rc1 review Florian Fainelli
2024-04-15 19:47 ` Pavel Machek
2024-04-15 23:53 ` Kelsey Steele
2024-04-16  0:17 ` Mark Brown
2024-04-16  6:34 ` Ron Economos
2024-04-16 11:55 ` Yann Sionneau
2024-04-16 12:03 ` Jon Hunter
2024-04-16 14:22 ` Pascal Ernster
2024-04-16 20:18 ` Mateusz Jończyk
2024-04-17  7:43 ` Naresh Kamboju

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=20240415141948.096683138@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=jpoimboe@kernel.org \
    --cc=mingo@kernel.org \
    --cc=nik.borisov@suse.com \
    --cc=patches@lists.linux.dev \
    --cc=seanjc@google.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.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