linux-brain/arch/x86/boot/compressed
Arvind Sankar 615d0014bf x86/boot: Use unsigned comparison for addresses
[ Upstream commit 81a34892c2c7c809f9c4e22c5ac936ae673fb9a2 ]

The load address is compared with LOAD_PHYSICAL_ADDR using a signed
comparison currently (using jge instruction).

When loading a 64-bit kernel using the new efi32_pe_entry() point added by:

  97aa276579b2 ("efi/x86: Add true mixed mode entry point into .compat section")

using Qemu with -m 3072, the firmware actually loads us above 2Gb,
resulting in a very early crash.

Use the JAE instruction to perform a unsigned comparison instead, as physical
addresses should be considered unsigned.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200301230436.2246909-6-nivedita@alum.mit.edu
Link: https://lore.kernel.org/r/20200308080859.21568-14-ardb@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-17 10:48:41 +02:00
..
.gitignore x86, boot: add new generated files to the appropriate .gitignore files 2009-06-02 21:13:30 -07:00
cmdline.c x86/mm: Introduce the 'no5lvl' kernel parameter 2018-05-19 11:56:57 +02:00
cpuflags.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
early_serial_console.c x86, boot: Don't compile early_serial_console.c when !CONFIG_EARLY_PRINTK 2014-08-17 14:58:24 -07:00
eboot.c x86/efi: Allocate e820 buffer before calling efi_exit_boot_service 2018-12-13 09:16:22 +01:00
eboot.h efi/x86: Align efi_uga_draw_protocol typedef names to convention 2018-07-22 14:13:42 +02:00
efi_stub_32.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
efi_stub_64.S x86/efi: Avoid triple faults during EFI mixed mode calls 2015-02-13 15:42:56 +00:00
efi_thunk_64.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
error.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
error.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
head_32.S x86/boot: Use unsigned comparison for addresses 2020-04-17 10:48:41 +02:00
head_64.S x86/boot: Use unsigned comparison for addresses 2020-04-17 10:48:41 +02:00
kaslr_64.c x86/boot/compressed: Don't declare __force_order in kaslr_64.c 2020-03-11 14:14:54 +01:00
kaslr.c module: allow symbol exports to be disabled 2018-08-22 10:52:47 -07:00
Makefile x86/boot: Add -Wno-pointer-sign to KBUILD_CFLAGS 2018-10-14 11:11:23 +02:00
mem_encrypt.S x86/boot: Fix kexec booting failure in the SEV bit detection code 2018-09-27 19:35:03 +02:00
misc.c x86, boot: Remove multiple copy of static function sanitize_boot_params() 2019-08-06 19:06:53 +02:00
misc.h x86, boot: Remove multiple copy of static function sanitize_boot_params() 2019-08-06 19:06:53 +02:00
mkpiggy.c x86/KASLR: Clean up unused code from old 'run_size' and rename it to 'kernel_total_size' 2016-04-29 11:03:30 +02:00
pgtable_64.c x86/boot/compressed/64: Fix missing initialization in find_trampoline_placement() 2019-09-10 10:33:53 +01:00
pgtable.h x86/boot/compressed/64: Set EFER.LME=1 in 32-bit trampoline before returning to long mode 2019-03-13 14:02:31 -07:00
string.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmlinux.lds.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00