Skip to content

Commit 3c60f67

Browse files
committed
efi/libstub: arm64: Remap relocated image with strict permissions
After relocating the executable image, use the EFI memory attributes protocol to remap the code and data regions with the appropriate permissions. Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent c7d9e62 commit 3c60f67

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/firmware/efi/libstub/arm64-stub.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ efi_status_t handle_kernel_image(unsigned long *image_addr,
139139
*image_addr = *reserve_addr;
140140
memcpy((void *)*image_addr, _text, kernel_size);
141141
caches_clean_inval_pou(*image_addr, *image_addr + kernel_codesize);
142+
efi_remap_image(*image_addr, *reserve_size, kernel_codesize);
142143

143144
return EFI_SUCCESS;
144145
}

0 commit comments

Comments
 (0)