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

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:

  97aa276579 ("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
..
boot x86/boot: Use unsigned comparison for addresses 2020-04-17 10:48:41 +02:00
configs
crypto crypto: x86/crct10dif-pcl - fix use via crypto_shash_digest() 2019-05-22 07:37:37 +02:00
entry x86/vdso: Provide missing include file 2020-02-24 08:34:44 +01:00
events perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag 2020-03-20 11:55:50 +01:00
hyperv x86/hyperv: Suppress "PCI: Fatal: No config space access function found" 2019-11-20 18:47:43 +01:00
ia32 x86/ia32: Fix ia32_restore_sigcontext() AC leak 2019-05-31 06:46:27 -07:00
include x86: Don't let pgprot_modify() change the page encryption bit 2020-04-17 10:48:39 +02:00
kernel ftrace/x86: Anotate text_mutex split between ftrace_arch_code_modify_post_process() and ftrace_arch_code_modify_prepare() 2020-04-02 15:28:15 +02:00
kvm KVM: x86: clear stale x86_emulate_ctxt->intercept value 2020-03-18 07:14:21 +01:00
lib x86/decoder: Add TEST opcode to Group3-2 2020-02-24 08:34:50 +01:00
math-emu x86: math-emu: Hide clang warnings for 16-bit overflow 2019-08-06 19:06:51 +02:00
mm x86/mm: split vmalloc_sync_all() 2020-03-25 08:06:13 +01:00
net bpf, x32: Fix bug for BPF_JMP | {BPF_JSGT, BPF_JSLE, BPF_JSLT, BPF_JSGE} 2019-11-24 08:19:17 +01:00
oprofile
pci x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect 2019-12-13 08:52:40 +01:00
platform efi/x86: Handle by-ref arguments covering multiple pages in mixed mode 2020-03-11 14:15:12 +01:00
power PM / hibernate: Check the success of generating md5 digest before hibernation 2019-11-24 08:19:56 +01:00
purgatory x86/purgatory: Disable the stackleak GCC plugin for the purgatory 2019-10-11 18:21:18 +02:00
ras
realmode x86/realmode: Don't leak the trampoline kernel address 2019-05-04 09:20:21 +02:00
tools x86/insn: Fix awk regexp warnings 2019-12-01 09:17:37 +01:00
um um: Drop own definition of PTRACE_SYSEMU/_SINGLESTEP 2018-11-21 09:19:16 +01:00
video
xen x86/xen: Distribute switch variables for initialization 2020-03-11 14:14:55 +01:00
.gitignore
Kbuild
Kconfig x86/olpc: Fix build error with CONFIG_MFD_CS5535=m 2019-11-24 08:20:30 +01:00
Kconfig.cpu
Kconfig.debug x86, perf: Fix the dependency of the x86 insn decoder selftest 2020-01-27 14:51:08 +01:00
Makefile x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning 2019-09-19 09:09:41 +02:00
Makefile.um
Makefile_32.cpu