projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7d9e62
)
efi/libstub: arm64: Remap relocated image with strict permissions
author
Ard Biesheuvel
<ardb@kernel.org>
Fri, 10 Mar 2023 11:55:41 +0000
(12:55 +0100)
committer
Ard Biesheuvel
<ardb@kernel.org>
Fri, 10 Mar 2023 13:11:39 +0000
(14:11 +0100)
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 <ardb@kernel.org>
drivers/firmware/efi/libstub/arm64-stub.c
patch
|
blob
|
history
diff --git
a/drivers/firmware/efi/libstub/arm64-stub.c
b/drivers/firmware/efi/libstub/arm64-stub.c
index
d4a6b12
..
b996553
100644
(file)
--- a/
drivers/firmware/efi/libstub/arm64-stub.c
+++ b/
drivers/firmware/efi/libstub/arm64-stub.c
@@
-139,6
+139,7
@@
efi_status_t handle_kernel_image(unsigned long *image_addr,
*image_addr = *reserve_addr;
memcpy((void *)*image_addr, _text, kernel_size);
caches_clean_inval_pou(*image_addr, *image_addr + kernel_codesize);
+ efi_remap_image(*image_addr, *reserve_size, kernel_codesize);
return EFI_SUCCESS;
}