]> git.baikalelectronics.ru Git - kernel.git/commit
x86/boot/compressed/64: Validate trampoline placement against E820
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Wed, 1 Aug 2018 13:32:25 +0000 (16:32 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 2 Aug 2018 12:22:22 +0000 (14:22 +0200)
commit96cb83c5673eac10e8c7223e7de8ec87c76696c6
tree2396dad62af3c907ef91afe6daac36a64e5609fd
parent6db23a5572a63f200253a684b63bdb41e7579ba1
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: ab59ea1cc1ad ("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
arch/x86/boot/compressed/pgtable_64.c