1
0
Fork 0
alistair23-linux/arch/x86/boot
Kirill A. Shutemov 1b3a626436 x86/boot/compressed/64: Validate trampoline placement against E820
There were two report of boot failure cased by trampoline placed into
a reserved memory region. It can happen on machines that don't report
EBDA correctly.

Fix the problem by re-validating the found address against the E820 table.
If the address is in a reserved area, find the next usable region below the
initial address.

Fixes: 3548e131ec ("x86/boot/compressed/64: Find a place for 32-bit trampoline")
Reported-by: Dmitry Malkin <d.malkin@real-time-systems.com>
Reported-by: youling 257 <youling257@gmail.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: https://lkml.kernel.org/r/20180801133225.38121-1-kirill.shutemov@linux.intel.com
2018-08-02 14:22:22 +02:00
..
compressed x86/boot/compressed/64: Validate trampoline placement against E820 2018-08-02 14:22:22 +02:00
tools License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
.gitignore x86/build: Add more generated files to the .gitignore file 2017-11-07 11:22:21 +01:00
Makefile x86/build: Factor out fdimage/isoimage generation commands to standalone script 2017-11-07 11:22:20 +01:00
a20.c x86, setup: "glove box" BIOS interrupts in the core boot code 2009-04-09 16:08:11 -07:00
apm.c x86, setup: "glove box" BIOS interrupts in the APM code 2009-04-09 16:08:11 -07:00
bioscall.S x86, boot: Move intcall() to the .inittext section 2014-01-04 14:29:08 -08:00
bitops.h x86, asm: use bool for bitops and other assembly outputs 2016-06-08 12:41:20 -07:00
boot.h x86/boot: Fix BSS corruption/overwrite bug in early x86 kernel startup 2017-04-20 10:05:23 +02:00
cmdline.c x86, boot: Pass cmd_line_ptr with unsigned long instead 2013-01-29 15:26:09 -08:00
code16gcc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
copy.S x86/boot: Remove unused copy_*_gs() functions 2017-06-05 09:35:16 +02:00
cpu.c Revert "x86/boot: Fail the boot if !M486 and CPUID is missing" 2016-12-19 11:54:20 +01:00
cpucheck.c x86/boot: Detect 5-level paging support 2017-04-04 08:22:33 +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
cpuflags.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ctype.h 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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
edd.c x86, boot: Create a separate string.h file to provide standard string functions 2014-03-19 15:43:45 -07:00
genimage.sh x86/build: Make isoimage work on Debian 2017-12-16 16:23:31 +01:00
header.S Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 16:32:30 -08:00
install.sh kbuild: use INSTALLKERNEL to select customized installkernel script 2009-09-20 12:18:14 +02:00
main.c x86/boot: Obsolete the MCA sys_desc_table 2015-07-21 10:55:11 +02:00
memory.c x86/boot/e820: Separate the E820 ABI structures from the in-kernel structures 2017-01-29 13:39:32 +01:00
mkcpustr.c x86/cpufeature: Carve out X86_FEATURE_* 2016-01-30 11:22:17 +01:00
mtools.conf.in i386: move boot 2007-10-11 11:16:45 +02:00
pm.c x86: remove zImage support 2009-03-11 11:00:00 -07:00
pmjump.S x86, setup: move 32-bit code to .text32 2009-03-17 15:26:06 -07:00
printf.c x86/boot: Fix a sanity check in printf.c 2013-08-14 11:48:41 +02:00
regs.c x86, boot: Create a separate string.h file to provide standard string functions 2014-03-19 15:43:45 -07:00
setup.ld x86, boot: Define the 2.12 bzImage boot protocol 2013-01-27 15:56:37 -08:00
string.c x86/boot: #undef memcpy() et al in string.c 2017-07-25 11:13:55 +02:00
string.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tty.c x86, setup: reorganize the early console setup 2010-08-02 15:51:56 -07:00
version.c kbuild: move utsrelease.h to include/generated 2009-12-12 13:08:15 +01:00
vesa.h x86-boot: don't request VBE2 information 2008-03-07 16:39:14 +01:00
video-bios.c x86: fix usage of bios intcall() 2009-07-04 12:56:32 -07:00
video-mode.c x86/mm: Fix regression with huge pages on PAE 2015-12-04 09:14:27 +01:00
video-vesa.c x86, boot: Create a separate string.h file to provide standard string functions 2014-03-19 15:43:45 -07:00
video-vga.c x86: Use ARRAY_SIZE 2017-10-19 16:15:47 +02:00
video.c x86/mm: Fix regression with huge pages on PAE 2015-12-04 09:14:27 +01:00
video.h x86/boot/video: Move the 'video_segment' variable to video.c 2015-02-19 00:25:05 +01:00