• Ard Biesheuvel's avatar
    efi: libstub: use EFI_LOADER_CODE region when moving the kernel in memory · 9cf42bca
    Ard Biesheuvel authored
    The EFI spec is not very clear about which permissions are being given
    when allocating pages of a certain type. However, it is quite obvious
    that EFI_LOADER_CODE is more likely to permit execution than
    EFI_LOADER_DATA, which becomes relevant once we permit booting the
    kernel proper with the firmware's 1:1 mapping still active.
    
    Ostensibly, recent systems such as the Surface Pro X grant executable
    permissions to EFI_LOADER_CODE regions but not EFI_LOADER_DATA regions.
    Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
    9cf42bca
alignedmem.c 1.61 KB