Re: [PATCH v11 4/4] x86/cpu: Clear feature bits whose dependencies were cleared

From: Borislav Petkov

Date: Mon Mar 23 2026 - 13:30:06 EST


On Fri, Mar 20, 2026 at 12:50:29PM +0000, Maciej Wieczor-Retman wrote:
> From: Maciej Wieczor-Retman <maciej.wieczor-retman@xxxxxxxxx>
>
> After cpu_caps_cleared[] is initialized with DISABLED_MASK_INIT,
> features present in disabled bitmasks are cleared from x86_capability[].
> However features that depend on them and are not part of any disabled
> mask are not cleared by anything. They can trigger the warning in
> check_cpufeature_deps(), as before both features would show up as
> enabled even though they weren't. The uncleared features can also still
> falsely show up in /proc/cpuinfo.

Well, why aren't we clearing those apply_forced_caps() too instead of clearing
them at check time?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette