@@ -138,11 +138,10 @@ associated with the source address of the indirect branch. Specifically,
138138the BHB might be shared across privilege levels even in the presence of
139139Enhanced IBRS.
140140
141- Currently the only known real-world BHB attack vector is via
142- unprivileged eBPF. Therefore, it's highly recommended to not enable
143- unprivileged eBPF, especially when eIBRS is used (without retpolines).
144- For a full mitigation against BHB attacks, it's recommended to use
145- retpolines (or eIBRS combined with retpolines).
141+ Previously the only known real-world BHB attack vector was via unprivileged
142+ eBPF. Further research has found attacks that don't require unprivileged eBPF.
143+ For a full mitigation against BHB attacks it is recommended to set BHI_DIS_S or
144+ use the BHB clearing sequence.
146145
147146Attack scenarios
148147----------------
@@ -430,6 +429,23 @@ The possible values in this file are:
430429 'PBRSB-eIBRS: Not affected' CPU is not affected by PBRSB
431430 =========================== =======================================================
432431
432+ - Branch History Injection (BHI) protection status:
433+
434+ .. list-table ::
435+
436+ * - BHI: Not affected
437+ - System is not affected
438+ * - BHI: Retpoline
439+ - System is protected by retpoline
440+ * - BHI: BHI_DIS_S
441+ - System is protected by BHI_DIS_S
442+ * - BHI: SW loop; KVM SW loop
443+ - 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
448+
433449Full mitigation might require a microcode update from the CPU
434450vendor. When the necessary microcode is not available, the kernel will
435451report vulnerability.
@@ -484,7 +500,11 @@ Spectre variant 2
484500
485501 Systems which support enhanced IBRS (eIBRS) enable IBRS protection once at
486502 boot, by setting the IBRS bit, and they're automatically protected against
487- Spectre v2 variant attacks.
503+ some Spectre v2 variant attacks. The BHB can still influence the choice of
504+ indirect branch predictor entry, and although branch predictor entries are
505+ isolated between modes when eIBRS is enabled, the BHB itself is not isolated
506+ between modes. Systems which support BHI_DIS_S will set it to protect against
507+ BHI attacks.
488508
489509 On Intel's enhanced IBRS systems, this includes cross-thread branch target
490510 injections on SMT systems (STIBP). In other words, Intel eIBRS enables
@@ -638,6 +658,22 @@ kernel command line.
638658 spectre_v2=off. Spectre variant 1 mitigations
639659 cannot be disabled.
640660
661+ spectre_bhi=
662+
663+ [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
666+ of the HW BHI control and the SW BHB clearing sequence.
667+
668+ on
669+ unconditionally enable.
670+ off
671+ unconditionally disable.
672+ auto
673+ enable if hardware mitigation
674+ control(BHI_DIS_S) is available, otherwise
675+ enable alternate mitigation in KVM.
676+
641677For spectre_v2_user see Documentation/admin-guide/kernel-parameters.txt
642678
643679Mitigation selection guide
0 commit comments