diff options
author | Yuntao Wang <ytcoode@gmail.com> | 2023-12-26 22:02:50 +0800 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2024-01-02 16:51:28 +0100 |
commit | 01638431c465741e071ab34acf3bef3c2570f878 (patch) | |
tree | 8768219050234a712c42bb31b438e8ccdb304b31 /tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py | |
parent | 50d7cdf7a9b1ab6f4f74a69c84e974d5dc0c1bf1 (diff) |
efi/x86: Fix the missing KASLR_FLAG bit in boot_params->hdr.loadflags
When KASLR is enabled, the KASLR_FLAG bit in boot_params->hdr.loadflags
should be set to 1 to propagate KASLR status from compressed kernel to
kernel, just as the choose_random_location() function does.
Currently, when the kernel is booted via the EFI stub, the KASLR_FLAG
bit in boot_params->hdr.loadflags is not set, even though it should be.
This causes some functions, such as kernel_randomize_memory(), not to
execute as expected. Fix it.
Fixes: a1b87d54f4e4 ("x86/efistub: Avoid legacy decompressor when doing EFI boot")
Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
[ardb: drop 'else' branch clearing KASLR_FLAG]
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'tools/testing/selftests/tc-testing/plugin-lib/nsPlugin.py')
0 files changed, 0 insertions, 0 deletions