diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2023-10-16 17:24:31 +0200 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2023-10-17 08:33:13 +0200 |
commit | db7724134c26fdf16886a560646d02292563f5a4 (patch) | |
tree | fe881c216a13bbffb69ec5a2e1869935959a0068 /drivers/firmware/efi/libstub/x86-stub.c | |
parent | efi: fix memory leak in krealloc failure handling (diff) | |
download | linux-db7724134c26fdf16886a560646d02292563f5a4.tar.xz linux-db7724134c26fdf16886a560646d02292563f5a4.zip |
x86/boot: efistub: Assign global boot_params variable
Now that the x86 EFI stub calls into some APIs exposed by the
decompressor (e.g., kaslr_get_random_long()), it is necessary to ensure
that the global boot_params variable is set correctly before doing so.
Note that the decompressor and the kernel proper carry conflicting
declarations for the global variable 'boot_params' so refer to it via an
alias to work around this.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/x86-stub.c')
-rw-r--r-- | drivers/firmware/efi/libstub/x86-stub.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c index 3b8bccd7c216..9d5df683f882 100644 --- a/drivers/firmware/efi/libstub/x86-stub.c +++ b/drivers/firmware/efi/libstub/x86-stub.c @@ -849,6 +849,8 @@ void __noreturn efi_stub_entry(efi_handle_t handle, unsigned long kernel_entry; efi_status_t status; + boot_params_pointer = boot_params; + efi_system_table = sys_table_arg; /* Check if we were booted by the EFI firmware */ if (efi_system_table->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE) |