]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: avoid dynamic relocations in early boot code
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Sat, 26 Dec 2015 11:46:40 +0000 (12:46 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 24 Feb 2016 14:57:25 +0000 (14:57 +0000)
commit5a5eb79601b50b4f525d9efddb186aec86a38ee3
treef11b8cd642f42576ea1928ae0625d128c53f99a5
parent486d7d1ad3b74465005c865fa9779d14fd6251a0
arm64: avoid dynamic relocations in early boot code

Before implementing KASLR for arm64 by building a self-relocating PIE
executable, we have to ensure that values we use before the relocation
routine is executed are not subject to dynamic relocation themselves.
This applies not only to virtual addresses, but also to values that are
supplied by the linker at build time and relocated using R_AARCH64_ABS64
relocations.

So instead, use assemble time constants, or force the use of static
relocations by folding the constants into the instructions.

Reviewed-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-entry.S
arch/arm64/kernel/head.S