* Ard Biesheuvel <ardb@xxxxxxxxxx> wrote: > On Mon, 16 Oct 2023 at 18:46, Ard Biesheuvel <ardb@xxxxxxxxxx> wrote: > > > > From: Ard Biesheuvel <ardb@xxxxxxxxxx> > > > > 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@xxxxxxxxxx> > > --- > > drivers/firmware/efi/libstub/x86-stub.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c > > index 3bfc59637dd1..51407207ded5 100644 > > --- a/drivers/firmware/efi/libstub/x86-stub.c > > +++ b/drivers/firmware/efi/libstub/x86-stub.c > > @@ -812,12 +812,15 @@ void __noreturn efi_stub_entry(efi_handle_t handle, > > efi_system_table_t *sys_table_arg, > > struct boot_params *boot_params) > > { > > + extern struct boot_params *bpp asm("boot_params"); > > I am getting hatemail from the bots about this extern declaration, so > I will move that into x86-stub.h. Hm, it would be better if we moved all of x86-stub.h into arch/x86/include/asm/ or so. We don't really encourage "deep" driver-level exports like that, and there's little reason why this couldn't be in the x86 headers, right? > Unless anyone minds, I'll queue this up and send it to Linus myself > via the EFI fixes branch. Other than the above: Acked-by: Ingo Molnar <mingo@xxxxxxxxxx> Thanks, Ingo