diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2021-07-22 12:10:31 +0200 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2021-08-03 07:43:02 +0200 |
commit | 3a262423755b83a5f85009ace415d6e7f572dfe8 (patch) | |
tree | 93763cf2704b930aebe885ee35d6f8fc45ade2af /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 5b94046efb4706b3429c9c8e7377bd8d1621d588 (diff) |
efi/libstub: arm64: Relax 2M alignment again for relocatable kernels
Commit 82046702e288 ("efi/libstub/arm64: Replace 'preferred' offset with
alignment check") simplified the way the stub moves the kernel image
around in memory before booting it, given that a relocatable image does
not need to be copied to a 2M aligned offset if it was loaded on a 64k
boundary by EFI.
Commit d32de9130f6c ("efi/arm64: libstub: Deal gracefully with
EFI_RNG_PROTOCOL failure") inadvertently defeated this logic by
overriding the value of efi_nokaslr if EFI_RNG_PROTOCOL is not
available, which was mistaken by the loader logic as an explicit request
on the part of the user to disable KASLR and any associated relocation
of an Image not loaded on a 2M boundary.
So let's reinstate this functionality, by capturing the value of
efi_nokaslr at function entry to choose the minimum alignment.
Fixes: d32de9130f6c ("efi/arm64: libstub: Deal gracefully with EFI_RNG_PROTOCOL failure")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions