Re: [PATCH v10 01/15] x86/cpu: Enumerate the LASS feature bits

From: Dave Hansen

Date: Tue Oct 07 2025 - 14:28:40 EST


On 10/7/25 11:19, Edgecombe, Rick P wrote:
>> { X86_FEATURE_SPEC_CTRL_SSBD, X86_FEATURE_SPEC_CTRL },
>> + { X86_FEATURE_LASS, X86_FEATURE_SMAP },
> Aha! So SMAP is required for LASS. This makes the stac/clac patch make more
> sense. Please those comments less seriously. Although I think a comment is still
> not unwarranted.

STAC/CLAC are also architected to:

#UD - If CPUID.(EAX=07H, ECX=0H):EBX.SMAP[bit 20] = 0.

So, even though LASS _technically_ doesn't require SMAP, it would be a
real pain without SMAP and STAC/CLAC. Thus, this series relies on SMAP
being present.

Actually, it might be worth breaking this dependency hunk out into its
own patch, just so there's a nice clean place to discuss this.