diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-12-06 19:09:00 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-12-06 19:09:00 +0100 |
commit | 55a677b256c363a0cdcd00781d392abeb6e1c0d1 (patch) | |
tree | f6ac439e9c019b331e4fa9695a8276b01b712b28 /arch/x86 | |
parent | Linux 5.16-rc4 (diff) | |
parent | x86/sme: Explicitly map new EFI memmap table as encrypted (diff) | |
download | linux-55a677b256c363a0cdcd00781d392abeb6e1c0d1.tar.xz linux-55a677b256c363a0cdcd00781d392abeb6e1c0d1.zip |
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
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/Kconfig | 1 | ||||
-rw-r--r-- | arch/x86/platform/efi/quirks.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 7399327d1eff..5c2ccb85f2ef 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1932,6 +1932,7 @@ config EFI depends on ACPI select UCS2_STRING select EFI_RUNTIME_WRAPPERS + select ARCH_USE_MEMREMAP_PROT help This enables the kernel to use EFI runtime services that are available (such as the EFI variable services). diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c index b15ebfe40a73..b0b848d6933a 100644 --- a/arch/x86/platform/efi/quirks.c +++ b/arch/x86/platform/efi/quirks.c @@ -277,7 +277,8 @@ void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size) return; } - new = early_memremap(data.phys_map, data.size); + new = early_memremap_prot(data.phys_map, data.size, + pgprot_val(pgprot_encrypted(FIXMAP_PAGE_NORMAL))); if (!new) { pr_err("Failed to map new boot services memmap\n"); return; |