summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMatt Fleming <matt@codeblueprint.co.uk>2016-09-19 13:09:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-30 10:12:46 +0200
commit39b47d3781fd51adee50b64cc0a4d52e8b873f6a (patch)
tree32f46119235a9f9f78c9ac1dc3bbd818f53e1d47 /arch
parenteb06045e539d847789f0a42c843559955deba693 (diff)
downloadlinux-stable-39b47d3781fd51adee50b64cc0a4d52e8b873f6a.tar.gz
linux-stable-39b47d3781fd51adee50b64cc0a4d52e8b873f6a.tar.bz2
linux-stable-39b47d3781fd51adee50b64cc0a4d52e8b873f6a.zip
x86/efi: Only map RAM into EFI page tables if in mixed-mode
commit 1297667083d5442aafe3e337b9413bf02b114edb upstream. Waiman reported that booting with CONFIG_EFI_MIXED enabled on his multi-terabyte HP machine results in boot crashes, because the EFI region mapping functions loop forever while trying to map those regions describing RAM. While this patch doesn't fix the underlying hang, there's really no reason to map EFI_CONVENTIONAL_MEMORY regions into the EFI page tables when mixed-mode is not in use at runtime. Reported-by: Waiman Long <waiman.long@hpe.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> CC: Theodore Ts'o <tytso@mit.edu> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Scott J Norton <scott.norton@hpe.com> Cc: Douglas Hatch <doug.hatch@hpe.com> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/platform/efi/efi_64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index b226b3f497f1..964c7022d31d 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -244,7 +244,7 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
* text and allocate a new stack because we can't rely on the
* stack pointer being < 4GB.
*/
- if (!IS_ENABLED(CONFIG_EFI_MIXED))
+ if (!IS_ENABLED(CONFIG_EFI_MIXED) || efi_is_native())
return 0;
/*