Skip to content

Commit 55a677b

Browse files
committed
Merge tag 'efi-urgent-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
Pull EFI fix from Ard Biesheuvel: "Ensure that the EFI memory map resides in encrypted memory even after it has been reallocated" * tag 'efi-urgent-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: x86/sme: Explicitly map new EFI memmap table as encrypted
2 parents 0fcfb00 + 1ff2fc0 commit 55a677b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

arch/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,6 +1932,7 @@ config EFI
19321932
depends on ACPI
19331933
select UCS2_STRING
19341934
select EFI_RUNTIME_WRAPPERS
1935+
select ARCH_USE_MEMREMAP_PROT
19351936
help
19361937
This enables the kernel to use EFI runtime services that are
19371938
available (such as the EFI variable services).

arch/x86/platform/efi/quirks.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size)
277277
return;
278278
}
279279

280-
new = early_memremap(data.phys_map, data.size);
280+
new = early_memremap_prot(data.phys_map, data.size,
281+
pgprot_val(pgprot_encrypted(FIXMAP_PAGE_NORMAL)));
281282
if (!new) {
282283
pr_err("Failed to map new boot services memmap\n");
283284
return;

0 commit comments

Comments
 (0)