Re: [PATCH] x86/lam: Disable ADDRESS_MASKING in most cases

From: Pawan Gupta
Date: Fri Jan 19 2024 - 14:29:53 EST


On Fri, Jan 19, 2024 at 09:48:14AM -0800, Sohil Mehta wrote:
> Hi Pawan,
>
> On 1/18/2024 6:35 PM, Pawan Gupta wrote:
> > arch/x86/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> > index 1566748f16c4..794517df8068 100644
> > --- a/arch/x86/Kconfig
> > +++ b/arch/x86/Kconfig
> > @@ -2270,6 +2270,7 @@ config RANDOMIZE_MEMORY_PHYSICAL_PADDING
> > config ADDRESS_MASKING
> > bool "Linear Address Masking support"
> > depends on X86_64
> > + depends on COMPILE_TEST || !SPECULATION_MITIGATIONS # wait for LASS
>
> I was wondering if the COMPILE_TEST dependency here is a bit redundant.
>
> Having ADDRESS_MASKING depend on just !SPECULATION_MITIGATIONS might be
> enough to get the LAM code compile tested through various configurations.
>
> I don't have a strong preference here. Mainly looking to understand the
> reasoning. Other than that the patch looks fine to me.

The goal is to compile test it whenever possible. As
SPECULATION_MITIGATIONS are ON by default, it wont get tested for most
configuration.