Skip to content

Commit 5f882f3

Browse files
jpoimboeIngo Molnar
authored andcommitted
x86/bugs: Clarify that syscall hardening isn't a BHI mitigation
While syscall hardening helps prevent some BHI attacks, there's still other low-hanging fruit remaining. Don't classify it as a mitigation and make it clear that the system may still be vulnerable if it doesn't have a HW or SW mitigation enabled. Fixes: ec9404e ("x86/bhi: Add BHI mitigation knob") Signed-off-by: Josh Poimboeuf <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Sean Christopherson <[email protected]> Link: https://lore.kernel.org/r/b5951dae3fdee7f1520d5136a27be3bdfe95f88b.1712813475.git.jpoimboe@kernel.org
1 parent 1cea8a2 commit 5f882f3

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

Documentation/admin-guide/hw-vuln/spectre.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,10 @@ The possible values in this file are:
441441
- System is protected by BHI_DIS_S
442442
* - BHI: SW loop, KVM SW loop
443443
- System is protected by software clearing sequence
444-
* - BHI: Syscall hardening
445-
- Syscalls are hardened against BHI
446-
* - BHI: Syscall hardening, KVM: SW loop
447-
- System is protected from userspace attacks by syscall hardening; KVM is protected by software clearing sequence
444+
* - BHI: Vulnerable
445+
- System is vulnerable to BHI
446+
* - BHI: Vulnerable, KVM: SW loop
447+
- System is vulnerable; KVM is protected by software clearing sequence
448448

449449
Full mitigation might require a microcode update from the CPU
450450
vendor. When the necessary microcode is not available, the kernel will
@@ -661,8 +661,7 @@ kernel command line.
661661
spectre_bhi=
662662

663663
[X86] Control mitigation of Branch History Injection
664-
(BHI) vulnerability. Syscalls are hardened against BHI
665-
regardless of this setting. This setting affects the deployment
664+
(BHI) vulnerability. This setting affects the deployment
666665
of the HW BHI control and the SW BHB clearing sequence.
667666

668667
on

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6065,8 +6065,7 @@
60656065
See Documentation/admin-guide/laptops/sonypi.rst
60666066

60676067
spectre_bhi= [X86] Control mitigation of Branch History Injection
6068-
(BHI) vulnerability. Syscalls are hardened against BHI
6069-
reglardless of this setting. This setting affects the
6068+
(BHI) vulnerability. This setting affects the
60706069
deployment of the HW BHI control and the SW BHB
60716070
clearing sequence.
60726071

arch/x86/kernel/cpu/bugs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2818,10 +2818,10 @@ static const char *spectre_bhi_state(void)
28182818
return "; BHI: SW loop, KVM: SW loop";
28192819
else if (boot_cpu_has(X86_FEATURE_RETPOLINE) && rrsba_disabled)
28202820
return "; BHI: Retpoline";
2821-
else if (boot_cpu_has(X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT))
2822-
return "; BHI: Syscall hardening, KVM: SW loop";
2821+
else if (boot_cpu_has(X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT))
2822+
return "; BHI: Vulnerable, KVM: SW loop";
28232823

2824-
return "; BHI: Vulnerable (Syscall hardening enabled)";
2824+
return "; BHI: Vulnerable";
28252825
}
28262826

28272827
static ssize_t spectre_v2_show_state(char *buf)

0 commit comments

Comments
 (0)