Re: [PATCH v6 13/18] x86/mm: LAM initialization
From: Alexander Potapenko <glider@google.com>
Date: 2025-11-11 09:05:12
Also in:
linux-doc, linux-kbuild, linux-mm, lkml
From: Alexander Potapenko <glider@google.com>
Date: 2025-11-11 09:05:12
Also in:
linux-doc, linux-kbuild, linux-mm, lkml
On Wed, Oct 29, 2025 at 9:08 PM Maciej Wieczor-Retman [off-list ref] wrote:
From: Maciej Wieczor-Retman <redacted> To make use of KASAN's tag based mode on x86, Linear Address Masking (LAM) needs to be enabled. To do that the 28th bit in CR4 has to be set. Set the bit in early memory initialization. When launching secondary CPUs the LAM bit gets lost. To avoid this add it in a mask in head_64.S. The bitmask permits some bits of CR4 to pass from the primary CPU to the secondary CPUs without being cleared. Signed-off-by: Maciej Wieczor-Retman <redacted>
Acked-by: Alexander Potapenko <glider@google.com>