[PATCH v2 0/2] arm: separate .data and .text sections of EFI binaries

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Mon Feb 26 22:24:06 CET 2024


For security it is preferable that memory pages for executable code are not
writable. So there should be only RX and RW pages. To enable this sections
of EFI binaries must be page aligned. Furthermore .text and .data sections
must be separated.

We already made the necessary changes for arm64 and riscv64. This series
addresses the arm32 architecture.

v2:
	New patch to page align EFI binary section.
	Consider that 32-bit arm uses .rel and not .rela relocations
	and discard them as they are cannot be used in EFI binaries.

Heinrich Schuchardt (2):
  arm: page align EFI binary section
  arm: separate .data and .text sections of EFI binaries

 arch/arm/lib/crt0_arm_efi.S  | 44 +++++++++++++++++++++++++++---------
 arch/arm/lib/elf_arm_efi.lds | 28 +++++++++++++++++------
 2 files changed, 54 insertions(+), 18 deletions(-)

-- 
2.43.0



More information about the U-Boot mailing list