diff options
author | Matt Fleming <matt.fleming@intel.com> | 2014-09-24 11:56:10 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2014-09-24 21:56:46 +0100 |
commit | 115c6628a59044958c205f8468a1b3ba3d539e61 (patch) | |
tree | f4b86b57a3a3de242ab58b8ddd20166fcb5e8a9b /drivers | |
parent | 56394ab8c26893bbaef02da04a06cc5ae71ccc5c (diff) |
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>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions