Re: [PATCH v11 3/4] x86/cpu: Do a sanity check on required feature bits
From: Maciej Wieczor-Retman
Date: Mon Mar 23 2026 - 13:27:25 EST
On 2026-03-23 at 17:31:45 +0100, Borislav Petkov wrote:
>On Fri, Mar 20, 2026 at 12:50:25PM +0000, Maciej Wieczor-Retman wrote:
>> From: Maciej Wieczor-Retman <maciej.wieczor-retman@xxxxxxxxx>
>>
>> After CPU identification concludes, do a sanity check by comparing the
>> final x86_capability bitmask with the pre-defined required feature bits.
>
>The use being?
>
>AFAICT, the required features are:
>
>$ cat arch/x86/include/generated/asm/cpufeaturemasks.h
>
>...
>
>/*
> * REQUIRED features:
> *
> * FPU MSR PAE CX8 CMOV FXSR XMM XMM2 LM NOPL ALWAYS CPUID
> */
>
>AFAICT, if *any* of those features are not set, the machine will crash'n'burn
>anyway.
>
>So the required features will be "enforced" pretty early :-)
>
>Otherwise they're not really required.
>
>And besides, what's
>
>arch/x86/kernel/verify_cpu.S
>
>for if not for that?
>
>--
>Regards/Gruss,
> Boris.
>
>https://people.kernel.org/tglx/notes-about-netiquette
hpa requested to add this patch to the series [1]. As he explained the other modern
boot stubs don't include the same checks that the Linux kernel has.
[1] https://lore.kernel.org/all/5fd597a1-46fe-4f46-98ee-d346260c85b5@xxxxxxxxx/
--
Kind regards
Maciej Wieczór-Retman