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

From: Sohil Mehta
Date: Fri Jan 19 2024 - 12:48:59 EST


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.

Sohil

> help
> Linear Address Masking (LAM) modifies the checking that is applied
> to 64-bit linear addresses, allowing software to use of the