summaryrefslogtreecommitdiffstats
path: root/arch/arm64/configs
diff options
context:
space:
mode:
authorArd Biesheuvel2014-08-13 19:53:03 +0200
committerWill Deacon2014-08-19 20:26:09 +0200
commit4190312beb2acfb7bfb1bb971e24a759aa96b0e8 (patch)
tree8de244a8483bf476270dfea7b49585fd86494cdd /arch/arm64/configs
parentasm-generic: add memfd_create system call to unistd.h (diff)
downloadkernel-qcow2-linux-4190312beb2acfb7bfb1bb971e24a759aa96b0e8.tar.gz
kernel-qcow2-linux-4190312beb2acfb7bfb1bb971e24a759aa96b0e8.tar.xz
kernel-qcow2-linux-4190312beb2acfb7bfb1bb971e24a759aa96b0e8.zip
arm64: align randomized TEXT_OFFSET on 4 kB boundary
When booting via UEFI, the kernel Image is loaded at a 4 kB boundary and the embedded EFI stub is executed in place. The EFI stub relocates the Image to reside TEXT_OFFSET bytes above a 2 MB boundary, and jumps into the kernel proper. In AArch64, PC relative symbol references are emitted using adrp/add or adrp/ldr pairs, where the offset into a 4 kB page is resolved using a separate :lo12: relocation. This implicitly assumes that the code will always be executed at the same relative offset with respect to a 4 kB boundary, or the references will point to the wrong address. This means we should link the kernel at a 4 kB aligned base address in order to remain compatible with the base address the UEFI loader uses when doing the initial load of Image. So update the code that generates TEXT_OFFSET to choose a multiple of 4 kB. At the same time, update the code so it chooses from the interval [0..2MB) as the author originally intended. Reviewed-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/configs')
0 files changed, 0 insertions, 0 deletions