]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
arm64: efi: split Image code and data into separate PE/COFF sections
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 23 Mar 2017 19:00:51 +0000 (19:00 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 4 Apr 2017 16:50:59 +0000 (17:50 +0100)
commitcad27ef27ef7d897893b921c86337a8cc9d0cd0e
tree47c3a1f4ba26c3890b3d11f16d8927c0558f0d27
parentf1eb542f39128bdf37f4556bc1d70991b89bb03d
arm64: efi: split Image code and data into separate PE/COFF sections

To prevent unintended modifications to the kernel text (malicious or
otherwise) while running the EFI stub, describe the kernel image as
two separate sections: a .text section with read-execute permissions,
covering .text, .rodata and .init.text, and a .data section with
read-write permissions, covering .init.data, .data and .bss.

This relies on the firmware to actually take the section permission
flags into account, but this is something that is currently being
implemented in EDK2, which means we will likely start seeing it in
the wild between one and two years from now.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/efi-header.S
arch/arm64/kernel/vmlinux.lds.S