Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/efistub: Drop redundant clearing of BSS

As it turns out, clearing the BSS was not the right fix for the issue
that was ultimately fixed by commit decd347c2a75 ("x86/efistub:
Reinstate soft limit for initrd loading"), and given that the Windows
EFI loader becomes very unhappy when entered with garbage in BSS, this
is one thing that x86 PC EFI implementations can be expected to get
right.

So drop it from the pure PE entrypoint. The handover protocol entrypoint
still needs this - it is used by the flaky distro bootloaders that
barely implement PE/COFF at all.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

-3
-3
drivers/firmware/efi/libstub/x86-stub.c
··· 541 541 efi_status_t status; 542 542 char *cmdline_ptr; 543 543 544 - if (efi_is_native()) 545 - memset(_bss, 0, _ebss - _bss); 546 - 547 544 efi_system_table = sys_table_arg; 548 545 549 546 /* Check if we were booted by the EFI firmware */