Skip to content

Commit 21b1a7f

Browse files
vianplardbiesheuvel
authored andcommitted
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 <nsaenz@amazon.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
1 parent 7eb4e1d commit 21b1a7f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • arch/x86/platform/efi

arch/x86/platform/efi/efi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,7 @@ static void __init kexec_enter_virtual_mode(void)
765765

766766
efi_sync_low_kernel_mappings();
767767
efi_native_runtime_setup();
768+
efi_runtime_update_mappings();
768769
#endif
769770
}
770771

0 commit comments

Comments
 (0)