Re: [PATCH v11 6/9] x86/kexec: Disable LASS during relocate kernel

From: Dave Hansen

Date: Fri Oct 31 2025 - 13:14:31 EST


On 10/29/25 14:03, Sohil Mehta wrote:
> The relocate kernel mechanism uses an identity mapping to copy the new
> kernel, which leads to a LASS violation when executing from a low
> address.
>
> LASS must be disabled after the original CR4 value is saved because
> kexec paths that preserve context need to restore CR4.LASS. But,
> disabling it along with CET during identity_mapped() is too late. So,
> disable LASS immediately after saving CR4, along with PGE, and before
> jumping to the identity-mapped page.

It's not great when we have to thread the needle like this, but I don't
have any better ideas:

Reviewed-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>