efi_stub_entry() and efi_handover_entry() are entered from efi-mixed.S and, through the efi32_stub_entry() and efi64_stub_entry() aliases, by boot loaders using the EFI handover protocol, but have no prototypes. Declare them in x86-stub.h, as asmlinkage, so that the stub can be built with the kernel's -Wmissing-prototypes.
Assisted-by: LLM Signed-off-by: Kees Cook <[email protected]> --- drivers/firmware/efi/libstub/x86-stub.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/firmware/efi/libstub/x86-stub.h b/drivers/firmware/efi/libstub/x86-stub.h index 1c20e99a6494..cc2474c0f95b 100644 --- a/drivers/firmware/efi/libstub/x86-stub.h +++ b/drivers/firmware/efi/libstub/x86-stub.h @@ -8,6 +8,15 @@ extern const u16 trampoline_ljmp_imm_offset; efi_status_t efi_adjust_memory_range_protection(unsigned long start, unsigned long size); +struct boot_params; + +asmlinkage void __noreturn efi_stub_entry(efi_handle_t handle, + efi_system_table_t *sys_table_arg, + struct boot_params *boot_params); +asmlinkage void efi_handover_entry(efi_handle_t handle, + efi_system_table_t *sys_table_arg, + struct boot_params *boot_params); + #ifdef CONFIG_X86_64 efi_status_t efi_setup_5level_paging(void); void efi_5level_switch(void); -- 2.55.0

