Merge tag 'efi-fixes-for-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
Pull EFI fix from Ard Biesheuvel:
"This fixes an oversight on my part in the recent EFI stub rework for
x86, which is needed to get Linux/x86 distro builds signed again for
secure boot by Microsoft. For this reason, most of this work is being
backported to v6.1, which is therefore also affected by this
regression.
- Explicitly wipe BSS in the native EFI entrypoint, so that globals
shared with the legacy decompressor are zero-initialized correctly"
* tag 'efi-fixes-for-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
x86/efistub: Clear decompressor BSS in native EFI entrypoint
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
#include "efistub.h"
|
||||
#include "x86-stub.h"
|
||||
|
||||
extern char _bss[], _ebss[];
|
||||
|
||||
const efi_system_table_t *efi_system_table;
|
||||
const efi_dxe_services_table_t *efi_dxe_table;
|
||||
static efi_loaded_image_t *image = NULL;
|
||||
@@ -474,6 +476,8 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
|
||||
efi_status_t status;
|
||||
char *cmdline_ptr;
|
||||
|
||||
memset(_bss, 0, _ebss - _bss);
|
||||
|
||||
efi_system_table = sys_table_arg;
|
||||
|
||||
/* Check if we were booted by the EFI firmware */
|
||||
@@ -970,8 +974,6 @@ fail:
|
||||
void efi_handover_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg,
|
||||
struct boot_params *boot_params)
|
||||
{
|
||||
extern char _bss[], _ebss[];
|
||||
|
||||
memset(_bss, 0, _ebss - _bss);
|
||||
efi_stub_entry(handle, sys_table_arg, boot_params);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user