Skip to content
Commit 9cf42bca authored by Ard Biesheuvel's avatar Ard Biesheuvel
Browse files

efi: libstub: use EFI_LOADER_CODE region when moving the kernel in memory



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>
parent 97712289
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment