Re: [PATCH v12 0/4] x86: Capability bits fix and required bits sanity check
From: Maciej Wieczor-Retman
Date: Mon Mar 30 2026 - 04:59:43 EST
On 2026-03-29 at 23:11:19 -0700, Andi Kleen wrote:
>
>I'm not sure what the point of this check is. Obviously the kernel cannot
>handle it, short of refusing to boot which would be far too drastic.
>
>And if it's just for having something in the kernel log, who would look
>for this? Any possible symptoms from a bogus cpuid will be far
>disconnected from that particular log location.
>
>Further, there's also no evidence that it is a real practical problem.
>If anything it could likely only come from rogue VMMs, but these don't
>seem to be common. But VMMs normally don't really disable ISA, so even if the
>CPUID is inconsistent things will still likely work because the actual
>instructions are fine.
>
>Assuming it was a real problem, you could just do it in a user program, why
>put it into the kernel and waste everyone's memory? (this cannot be
>initcode due to hotplug)
>
>Also it seems to violate Steinbach's system programing maxim
>(never check for something you don't know how to handle)
>
>-Andi
According to hpa [1] one could for example boot with PAE disabled and it might
go unnoticed. In that thread it was also mentioned that the BIOS might have
something required disabled and even if the system will not get to boot fully a
user could get a clue what failed.
Also a user could technically disable required features through clearcpuid. I
know it will also taint the kernel but no warning is produced if the cleared
feature was required.
[1] https://lore.kernel.org/all/207ba0a6-5ebc-465a-8d54-6e5a99622a72@xxxxxxxxx/
--
Kind regards
Maciej Wieczór-Retman