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

From: Borislav Petkov

Date: Mon Mar 23 2026 - 14:18:18 EST


On Mon, Mar 23, 2026 at 05:23:19PM +0000, Maciej Wieczor-Retman wrote:
> Clearing the compile time disabled bits is fairly low effort since it's just
> initializing the cpu_caps_cleared[].

and cpu_caps_cleared[] is consulted in apply_forced_caps().

> To validate the whole cpuid_deps[] array and add relevant bits to
> cpu_caps_cleared[] would probably require adding another loop that would
> check all of the entries. Since now only SGX has this problem I didn't think
> it warranted adding more than this check in check_cpufeature_deps().

So we're going to do half-baked solution again and it'll come to bite us in
the ass later?

How about we hammer it out properly once and for all?

--
Regards/Gruss,
Boris.

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