Skip to content

Commit 09e6cbe

Browse files
jpoimboegregkh
authored andcommitted
x86/bugs: Replace CONFIG_SPECTRE_BHI_{ON,OFF} with CONFIG_MITIGATION_SPECTRE_BHI
commit 4f51173 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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Sean Christopherson <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Nikolay Borisov <[email protected]> Link: https://lore.kernel.org/r/3833812ea63e7fdbe36bf8b932e63f70d18e2a2a.1712813475.git.jpoimboe@kernel.org Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a823da6 commit 09e6cbe

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

arch/x86/Kconfig

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2566,27 +2566,16 @@ config MITIGATION_RFDS
25662566
stored in floating point, vector and integer registers.
25672567
See also <file:Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst>
25682568

2569-
choice
2570-
prompt "Clear branch history"
2569+
config MITIGATION_SPECTRE_BHI
2570+
bool "Mitigate Spectre-BHB (Branch History Injection)"
25712571
depends on CPU_SUP_INTEL
2572-
default SPECTRE_BHI_ON
2572+
default y
25732573
help
25742574
Enable BHI mitigations. BHI attacks are a form of Spectre V2 attacks
25752575
where the branch history buffer is poisoned to speculatively steer
25762576
indirect branches.
25772577
See <file:Documentation/admin-guide/hw-vuln/spectre.rst>
25782578

2579-
config SPECTRE_BHI_ON
2580-
bool "on"
2581-
help
2582-
Equivalent to setting spectre_bhi=on command line parameter.
2583-
config SPECTRE_BHI_OFF
2584-
bool "off"
2585-
help
2586-
Equivalent to setting spectre_bhi=off command line parameter.
2587-
2588-
endchoice
2589-
25902579
endif
25912580

25922581
config ARCH_HAS_ADD_PAGES

arch/x86/kernel/cpu/bugs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,7 @@ enum bhi_mitigations {
16271627
};
16281628

16291629
static enum bhi_mitigations bhi_mitigation __ro_after_init =
1630-
IS_ENABLED(CONFIG_SPECTRE_BHI_ON) ? BHI_MITIGATION_ON : BHI_MITIGATION_OFF;
1630+
IS_ENABLED(CONFIG_MITIGATION_SPECTRE_BHI) ? BHI_MITIGATION_ON : BHI_MITIGATION_OFF;
16311631

16321632
static int __init spectre_bhi_parse_cmdline(char *str)
16331633
{

0 commit comments

Comments
 (0)