linux-stable/arch/x86
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
..
boot x86/efi: Truncate 64-bit values when calling 32-bit OutputString() 2014-09-24 21:56:46 +01:00
configs USB: remove CONFIG_USB_DEBUG from defconfig files 2014-05-28 09:40:45 -07:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2014-08-04 09:52:51 -07:00
ia32 x86, vdso: Reimplement vdso.so preparation in build-time C 2014-05-05 13:18:51 -07:00
include Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>" 2014-09-23 22:01:55 +01:00
kernel * WARN_ON(!spin_is_locked()) always triggers on non-SMP machines. 2014-08-22 10:04:15 +02:00
kvm KVM: x86: do not check CS.DPL against RPL during task switch 2014-08-19 15:12:28 +02:00
lguest asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
lib Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-06-12 19:18:49 -07:00
math-emu asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
mm * WARN_ON(!spin_is_locked()) always triggers on non-SMP machines. 2014-08-22 10:04:15 +02:00
net net: filter: split 'struct sk_filter' into socket and bpf parts 2014-08-02 15:03:58 -07:00
oprofile x86, oprofile, nmi: Fix CPU hotplug callback registration 2014-03-20 13:43:43 +01:00
pci Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-08-13 18:23:32 -06:00
platform Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-08-13 18:23:32 -06:00
power x86, power, suspend: Annotate restore_processor_state() with notrace 2014-07-17 09:45:05 -04:00
purgatory kexec: support for kexec on panic using new system call 2014-08-08 15:57:33 -07:00
realmode x86/build: Supress realmode.bin is up to date message 2014-04-16 15:17:24 +02:00
syscalls kexec: new syscall kexec_file_load() declaration 2014-08-08 15:57:32 -07:00
tools x86/build: Supress "Nothing to be done for ..." messages 2014-04-14 11:44:36 +02:00
um Merge branch 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2014-08-09 09:58:12 -07:00
vdso arm64,ia64,ppc,s390,sh,tile,um,x86,mm: remove default gate area 2014-08-08 15:57:27 -07:00
video
xen x86/xen: use vmap() to map grant table pages in PVH guests 2014-08-11 11:59:35 +01:00
.gitignore
Kbuild purgatory: core purgatory functionality 2014-08-08 15:57:32 -07:00
Kconfig Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-08-13 18:23:32 -06:00
Kconfig.cpu Merge branch 'x86-nuke-platforms-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-02 13:15:58 -07:00
Kconfig.debug x86/efi: Dump the EFI page table 2014-03-04 16:17:17 +00:00
Makefile purgatory: core purgatory functionality 2014-08-08 15:57:32 -07:00
Makefile.um
Makefile_32.cpu