x86/boot/compressed/64: Do not read legacy ROM on EFI system
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Tue, 19 Feb 2019 07:52:24 +0000 (10:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Mar 2019 06:17:20 +0000 (07:17 +0100)
commit51c5318058013f06bd5e85166d60d4dbfb9a2072
treeef3e4cc27831b8873ddb73ef12a28f6d43e96d47
parenteab5ea25ebee29b2bd8cefe98f12afe2159cf530
x86/boot/compressed/64: Do not read legacy ROM on EFI system

commit 6f913de3231e1d70a871135b38219da7810df218 upstream.

EFI systems do not necessarily provide a legacy ROM. If the ROM is missing
the memory is not mapped at all.

Trying to dereference values in the legacy ROM area leads to a crash on
Macbook Pro.

Only look for values in the legacy ROM area for non-EFI system.

Fixes: 3548e131ec6a ("x86/boot/compressed/64: Find a place for 32-bit trampoline")
Reported-by: Pitam Mitra <pitamm@gmail.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Bockjoo Kim <bockjoo@phys.ufl.edu>
Cc: bp@alien8.de
Cc: hpa@zytor.com
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20190219075224.35058-1-kirill.shutemov@linux.intel.com
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202351
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/boot/compressed/pgtable_64.c