Skip to content
Commit 5d12da9d authored by Ard Biesheuvel's avatar Ard Biesheuvel
Browse files

efi/libstub/arm64: Simplify randomized loading of kernel image



The KASLR code path in the arm64 version of the EFI stub incorporates
some overly complicated logic to randomly allocate a region of the right
alignment: there is no need to randomize the placement of the kernel
modulo 2 MiB separately from the placement of the 2 MiB aligned allocation
itself - we can simply follow the same logic used by the non-randomized
placement, which is to allocate at the correct alignment, and only take
TEXT_OFFSET into account if it is not a round multiple of the alignment.

Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent 82046702
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment