Re: [PATCH v11 3/4] x86/cpu: Do a sanity check on required feature bits
From: H. Peter Anvin
Date: Fri Mar 27 2026 - 22:33:43 EST
On 2026-03-27 18:52, H. Peter Anvin wrote:
>
> One thing that matters here is that these bitmaps are *already* accessed using
> bitop operations. Therefore, if this is a problem *here*, then it is a problem
> *everywhere*. The simplest way to deal with it is probably to require NCAPINTS
> and NBUGINTS to be even, even (pun intended) if that means a temporarily
> unused word at the end of the array. That doesn't even require any code
> changes, just a statement at the top of cpufeatures.h (see attached patch for
> an untested example.)
>
Untested indeed. I just realized this breaks cpufeaturemasks.awk:
# Note: this blithely assumes that each word has at least one
# feature defined in it; if not, something else is wrong!
-hpa