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

From: bot+bpf-ci

Date: Thu Mar 19 2026 - 12:53:24 EST


> 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.


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/23303796353