linux/drivers/firmware/efi/libstub
Arvind Sankar 59476f80d8 efi/x86: Only copy upto the end of setup_header
When copying the setup_header into the boot_params buffer, only the data
that is actually part of the setup_header should be copied.

efi_pe_entry() currently copies the entire second sector, which
initializes some of the fields in boot_params beyond the setup_header
with garbage (i.e. part of the real-mode boot code gets copied into
those fields).

This does not cause any issues currently because the fields that are
overwritten are padding, BIOS EDD information that won't get used, and
the E820 table which will get properly filled in later.

Fix this to only copy data that is actually part of the setup_header
structure.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2020-06-25 18:09:48 +02:00
..
alignedmem.c efi/libstub: Add API function to allocate aligned memory 2020-04-24 14:52:16 +02:00
arm32-stub.c efi/libstub: arm: Print CPU boot mode and MMU state at boot 2020-06-17 15:29:11 +02:00
arm64-stub.c efi/libstub: Move pr_efi/pr_efi_err into efi namespace 2020-05-01 09:40:02 +02:00
efi-stub-helper.c efi/libstub: Descriptions for stub helper functions 2020-06-16 11:01:07 +02:00
efi-stub.c efi/libstub: arm: Print CPU boot mode and MMU state at boot 2020-06-17 15:29:11 +02:00
efistub.h efi/libstub: arm: Print CPU boot mode and MMU state at boot 2020-06-17 15:29:11 +02:00
fdt.c efi/libstub: Move pr_efi/pr_efi_err into efi namespace 2020-05-01 09:40:02 +02:00
file.c efi/libstub: Fix path separator regression 2020-06-15 19:43:59 +02:00
gop.c efi/gop: Add an option to list out the available GOP modes 2020-05-20 19:09:20 +02:00
hidden.h efi/libstub: Use hidden visibility for all source files 2020-02-23 21:57:12 +01:00
Makefile efi/x86: Fix build with gcc 4 2020-06-15 11:41:14 +02:00
mem.c Linux 5.7-rc7 2020-05-25 15:10:37 +02:00
pci.c efi/libstub: Correct comment typos 2020-05-06 11:27:55 +02:00
random.c efi/libstub: Describe RNG functions 2020-02-23 21:57:19 +01:00
randomalloc.c efi/libstub/random: Increase random alloc granularity 2020-04-23 20:15:06 +02:00
relocate.c efi/libstub: Correct comment typos 2020-05-06 11:27:55 +02:00
secureboot.c efi/libstub: Move pr_efi/pr_efi_err into efi namespace 2020-05-01 09:40:02 +02:00
skip_spaces.c efi/libstub: Fix missing-prototype warning for skip_spaces() 2020-06-15 19:43:58 +02:00
string.c efi/libstub: Clean up command line parsing routine 2020-02-23 21:57:15 +01:00
tpm.c More EFI changes for v5.8: 2020-05-25 15:11:14 +02:00
vsprintf.c efi/printf: Add support for wchar_t (UTF-16) 2020-05-20 19:09:20 +02:00
x86-stub.c efi/x86: Only copy upto the end of setup_header 2020-06-25 18:09:48 +02:00