[PATCH v5 16/16] Revert "x86/lam: Disable ADDRESS_MASKING in most cases"

Alexander Shishkin posted 16 patches 3 weeks, 6 days ago
[PATCH v5 16/16] Revert "x86/lam: Disable ADDRESS_MASKING in most cases"
Posted by Alexander Shishkin 3 weeks, 6 days ago
This reverts commit 3267cb6d3a174ff83d6287dcd5b0047bbd912452.

LASS mitigates the Spectre based on LAM (SLAM) [1] and an earlier
commit made LAM depend on LASS, so we no longer need to disable LAM at
compile time, so revert the commit that disables LAM.

[1] https://download.vusec.net/papers/slam_sp24.pdf

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
CC: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
---
 arch/x86/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 0bdb7a394f59..192d5145f54e 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2257,7 +2257,6 @@ config RANDOMIZE_MEMORY_PHYSICAL_PADDING
 config ADDRESS_MASKING
 	bool "Linear Address Masking support"
 	depends on X86_64
-	depends on COMPILE_TEST || !CPU_MITIGATIONS # wait for LASS
 	help
 	  Linear Address Masking (LAM) modifies the checking that is applied
 	  to 64-bit linear addresses, allowing software to use of the
-- 
2.45.2
Re: [PATCH v5 16/16] Revert "x86/lam: Disable ADDRESS_MASKING in most cases"
Posted by Kirill A. Shutemov 3 weeks, 6 days ago
On Mon, Oct 28, 2024 at 06:08:04PM +0200, Alexander Shishkin wrote:
> This reverts commit 3267cb6d3a174ff83d6287dcd5b0047bbd912452.
> 
> LASS mitigates the Spectre based on LAM (SLAM) [1] and an earlier
> commit made LAM depend on LASS, so we no longer need to disable LAM at
> compile time, so revert the commit that disables LAM.
> 
> [1] https://download.vusec.net/papers/slam_sp24.pdf
> 
> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> CC: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>

Before re-enabling LAM, you need to uncomment X86_FEATURE_LAM check in
arch/x86/kernel/cpu/common.c introduced in recent 86e6b1547b3d ("x86: fix
user address masking non-canonical speculation issue").

-- 
  Kiryl Shutsemau / Kirill A. Shutemov
Re: [PATCH v5 16/16] Revert "x86/lam: Disable ADDRESS_MASKING in most cases"
Posted by Alexander Shishkin 3 weeks, 6 days ago
"Kirill A. Shutemov" <kirill@shutemov.name> writes:

> On Mon, Oct 28, 2024 at 06:08:04PM +0200, Alexander Shishkin wrote:
>> This reverts commit 3267cb6d3a174ff83d6287dcd5b0047bbd912452.
>> 
>> LASS mitigates the Spectre based on LAM (SLAM) [1] and an earlier
>> commit made LAM depend on LASS, so we no longer need to disable LAM at
>> compile time, so revert the commit that disables LAM.
>> 
>> [1] https://download.vusec.net/papers/slam_sp24.pdf
>> 
>> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
>> CC: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
>
> Before re-enabling LAM, you need to uncomment X86_FEATURE_LAM check in
> arch/x86/kernel/cpu/common.c introduced in recent 86e6b1547b3d ("x86: fix
> user address masking non-canonical speculation issue").

Forgot about that one. Thanks!

Regards,
--
Alex