Re: [PATCH v2] x86: Clear feature bits disabled at compile-time
From: Borislav Petkov
Date: Wed Jul 23 2025 - 09:45:27 EST
On Wed, Jul 23, 2025 at 11:22:49AM +0200, Maciej Wieczor-Retman wrote:
> +static __init void init_cpu_cap(struct cpuinfo_x86 *c)
> +{
> + int i;
> +
> + for (i = 0; i < NCAPINTS; i++) {
> + cpu_caps_set[i] = REQUIRED_MASK(i);
> + cpu_caps_cleared[i] = DISABLED_MASK(i);
> + }
> +}
There's already apply_forced_caps(). Not another cap massaging function
please. Add that stuff there.
As to what the Fixes: tag should be - it should not have any Fixes: tag
because AFAICT, this has always been this way. So this fix should be
backported everywhere.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette