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

efi/libstub: arm64: Double check image alignment at entry



On arm64, the stub only moves the kernel image around in memory if
needed, which is typically only for KASLR, given that relocatable
kernels (which is the default) can run from any 64k aligned address,
which is also the minimum alignment communicated to EFI via the PE/COFF
header.

Unfortunately, some loaders appear to ignore this header, and load the
kernel at some arbitrary offset in memory. We can deal with this, but
let's check for this condition anyway, so non-compliant code can be
spotted and fixed.

Cc: <stable@vger.kernel.org> # v5.10+
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
Tested-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent ff80ef5b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment