]> git.itanic.dy.fi Git - linux-stable/commitdiff
x86/bugs: Clarify that syscall hardening isn't a BHI mitigation
authorJosh Poimboeuf <jpoimboe@kernel.org>
Thu, 11 Apr 2024 05:40:48 +0000 (22:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2024 09:23:41 +0000 (11:23 +0200)
commit 5f882f3b0a8bf0788d5a0ee44b1191de5319bb8a upstream.

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: ec9404e40e8f ("x86/bhi: Add BHI mitigation knob")
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/b5951dae3fdee7f1520d5136a27be3bdfe95f88b.1712813475.git.jpoimboe@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/admin-guide/hw-vuln/spectre.rst
Documentation/admin-guide/kernel-parameters.txt
arch/x86/kernel/cpu/bugs.c

index d4f2606340741b56061ed8fd9575eb293c87de77..081f289008987370c57cf5ceafe385915d68c1e0 100644 (file)
@@ -441,10 +441,10 @@ The possible values in this file are:
    - System is protected by BHI_DIS_S
  * - BHI: SW loop, KVM SW loop
    - System is protected by software clearing sequence
- * - BHI: Syscall hardening
-   - Syscalls are hardened against BHI
- * - BHI: Syscall hardening, KVM: SW loop
-   - System is protected from userspace attacks by syscall hardening; KVM is protected by software clearing sequence
+ * - BHI: Vulnerable
+   - System is vulnerable to BHI
+ * - BHI: Vulnerable, KVM: SW loop
+   - System is vulnerable; KVM is protected by software clearing sequence
 
 Full mitigation might require a microcode update from the CPU
 vendor. When the necessary microcode is not available, the kernel will
@@ -661,8 +661,7 @@ kernel command line.
        spectre_bhi=
 
                [X86] Control mitigation of Branch History Injection
-               (BHI) vulnerability. Syscalls are hardened against BHI
-               regardless of this setting. This setting affects the deployment
+               (BHI) vulnerability.  This setting affects the deployment
                of the HW BHI control and the SW BHB clearing sequence.
 
                on
index 5d56eccd93d80e0ae87cfc540611f0b297cea9b1..9770a9168a7da9dcc2ae0aff03c4ce8ced9f9c8f 100644 (file)
                        See Documentation/admin-guide/laptops/sonypi.rst
 
        spectre_bhi=    [X86] Control mitigation of Branch History Injection
-                       (BHI) vulnerability. Syscalls are hardened against BHI
-                       reglardless of this setting. This setting affects the
+                       (BHI) vulnerability.  This setting affects the
                        deployment of the HW BHI control and the SW BHB
                        clearing sequence.
 
index 9ff8c13d7b6d19f2ca937b50ae2001012b85e4cf..5883fa2e1f704aba59bdec609800d92de34a48fb 100644 (file)
@@ -2817,10 +2817,10 @@ static const char *spectre_bhi_state(void)
                return "; BHI: SW loop, KVM: SW loop";
        else if (boot_cpu_has(X86_FEATURE_RETPOLINE) && rrsba_disabled)
                return "; BHI: Retpoline";
-       else if  (boot_cpu_has(X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT))
-               return "; BHI: Syscall hardening, KVM: SW loop";
+       else if (boot_cpu_has(X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT))
+               return "; BHI: Vulnerable, KVM: SW loop";
 
-       return "; BHI: Vulnerable (Syscall hardening enabled)";
+       return "; BHI: Vulnerable";
 }
 
 static ssize_t spectre_v2_show_state(char *buf)