From: Nicolas Saenz Julienne Date: Tue, 12 Nov 2024 18:52:17 +0000 (+0000) Subject: x86/efi: Apply EFI Memory Attributes after kexec X-Git-Tag: v6.13-rc1~146^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=21b1a7f7ae2f53c914f584a72a85cb4f71227e28;p=thirdparty%2Flinux.git x86/efi: Apply EFI Memory Attributes after kexec Kexec bypasses EFI's switch to virtual mode. In exchange, it has its own routine, kexec_enter_virtual_mode(), which replays the mappings made by the original kernel. Unfortunately, that function fails to reinstate EFI's memory attributes, which would've otherwise been set after entering virtual mode. Remediate this by calling efi_runtime_update_mappings() within kexec's routine. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Ard Biesheuvel --- diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 375ebd78296ad..a7ff189421c3d 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c @@ -765,6 +765,7 @@ static void __init kexec_enter_virtual_mode(void) efi_sync_low_kernel_mappings(); efi_native_runtime_setup(); + efi_runtime_update_mappings(); #endif }