• Tom Lendacky's avatar
    x86/sme: Explicitly map new EFI memmap table as encrypted · 4355c9f3
    Tom Lendacky authored
    commit 1ff2fc02 upstream.
    
    Reserving memory using efi_mem_reserve() calls into the x86
    efi_arch_mem_reserve() function. This function will insert a new EFI
    memory descriptor into the EFI memory map representing the area of
    memory to be reserved and marking it as EFI runtime memory. As part
    of adding this new entry, a new EFI memory map is allocated and mapped.
    The mapping is where a problem can occur. This new memory map is mapped
    using early_memremap() and generally mapped encrypted, unless the new
    memory for the mapping happens to come from an area of memory that is
    marked as EFI_BOOT_SERVICES_DATA memory. In this case, the new memory will
    be mapped unencrypted. However, during replacement of the old memory map,
    efi_mem_type() is disabled, so the new memory map will now be long-term
    mapped encrypted (in efi.memmap), resulting in the map containing invalid
    data and causing the kernel boot to crash.
    
    Since it is know...
    4355c9f3
Kconfig 95.4 KB