linux/arch/x86/boot/compressed
Matt Fleming 115c6628a5 x86/efi: Truncate 64-bit values when calling 32-bit OutputString()
If we're executing the 32-bit efi_char16_printk() code path (i.e.
running on top of 32-bit firmware) we know that efi_early->text_output
will be a 32-bit value, even though ->text_output has type u64.

Unfortunately, we currently pass ->text_output directly to
efi_early->call() so for CONFIG_X86_32 the compiler will push a 64-bit
value onto the stack, causing the other parameters to be misaligned.

The way we handle this in the rest of the EFI boot stub is to pass
pointers as arguments to efi_early->call(), which automatically do the
right thing (pointers are 32-bit on CONFIG_X86_32, and we simply ignore
the upper 32-bits of the argument register if running in 64-bit mode
with 32-bit firmware).

This fixes a corruption bug when printing strings from the 32-bit EFI
boot stub.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=84241
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2014-09-24 21:56:46 +01:00
..
.gitignore
aslr.c x86, kaslr: boot-time selectable with hibernation 2014-06-16 23:30:44 +02:00
cmdline.c x86, kaslr: Return location from decompress_kernel 2013-10-13 03:12:07 -07:00
cpuflags.c x86, boot: Rename get_flags() and check_flags() to *_cpuflags() 2013-10-13 04:08:56 -07:00
early_serial_console.c x86, boot: Exclude early_serial_console.c if can't use it. 2012-07-21 11:07:34 -07:00
eboot.c x86/efi: Truncate 64-bit values when calling 32-bit OutputString() 2014-09-24 21:56:46 +01:00
eboot.h Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>" 2014-09-23 22:01:55 +01:00
efi_stub_32.S x86, efi: EFI boot stub support 2011-12-12 14:26:10 -08:00
efi_stub_64.S x86/efi: Add early thunk code to go from 64-bit to 32-bit 2014-03-04 21:25:04 +00:00
head_32.S x86/efi: Fixup GOT in all boot code paths 2014-09-08 20:52:02 +01:00
head_64.S x86/efi: Fixup GOT in all boot code paths 2014-09-08 20:52:02 +01:00
Makefile Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>" 2014-09-23 22:01:55 +01:00
misc.c asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
misc.h x86, kaslr: Select random position from e820 maps 2013-10-13 03:12:19 -07:00
mkpiggy.c x86: mkpiggy.c: Explicitly close the output file 2013-10-08 11:36:09 -07:00
string.c x86, boot: Remove misc.h inclusion from compressed/string.c 2014-05-08 08:00:06 -07:00
vmlinux.lds.S x86, setup: Allow global variables and functions in the decompressor 2010-08-02 15:34:44 -07:00