Re: [PATCH v7 10/10] x86/vmscape: Add cmdline vmscape=on to override attack vector controls

From: Pawan Gupta

Date: Thu Mar 19 2026 - 13:58:28 EST


On Thu, Mar 19, 2026 at 04:40:21PM +0000, bot+bpf-ci@xxxxxxxxxx wrote:
> > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> > --- a/Documentation/admin-guide/kernel-parameters.txt
> > +++ b/Documentation/admin-guide/kernel-parameters.txt
> > @@ -8375,9 +8375,11 @@
> >
> > off - disable the mitigation
> > ibpb - use Indirect Branch Prediction Barrier
> > - (IBPB) mitigation (default)
> > + (IBPB) mitigation
> > force - force vulnerability detection even on
> > unaffected processors
> > + on - (default) selects IBPB or BHB clear
> > + mitigation based on CPU
>
> Is the "(default)" label accurate here? The code default is
> VMSCAPE_MITIGATION_AUTO, not VMSCAPE_MITIGATION_ON:
>
> static enum vmscape_mitigations vmscape_mitigation __ro_after_init =
> IS_ENABLED(CONFIG_MITIGATION_VMSCAPE) ?
> VMSCAPE_MITIGATION_AUTO : VMSCAPE_MITIGATION_NONE;
>
> In vmscape_select_mitigation(), AUTO and ON take the same switch
> path for selecting between BHB clear and IBPB. But AUTO goes
> through this check first:
>
> if ((vmscape_mitigation == VMSCAPE_MITIGATION_AUTO) &&
> !should_mitigate_vuln(X86_BUG_VMSCAPE))
> vmscape_mitigation = VMSCAPE_MITIGATION_NONE;
>
> ON skips that check, which is the whole point of this commit per
> the subject line ("override attack vector controls").
>
> A sysadmin reading "on (default)" would conclude that not passing
> any option gives the same behavior as vmscape=on, but the actual
> default respects attack vector controls while vmscape=on overrides
> them.

Thats a valid point. Updating the documentation as below:

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 1068569be5cf..98204d464477 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -8381,8 +8381,10 @@ Kernel parameters
(IBPB) mitigation
force - force vulnerability detection even on
unaffected processors
- on - (default) selects IBPB or BHB clear
+ auto - (default) use IBPB or BHB clear
mitigation based on CPU
+ on - same as "auto", but override attack
+ vector control

vsyscall= [X86-64,EARLY]
Controls the behavior of vsyscalls (i.e. calls to