]> git.baikalelectronics.ru Git - kernel.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)
commit64a1fe22f76b252dab0f9de03af943ada91b7343
tree47c3a1f4ba26c3890b3d11f16d8927c0558f0d27
parent5c7f253695942ca3850110bc571357d4d71e2472
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