Commit-ID: 1297667083d5442aafe3e337b9413bf02b114edb Gitweb: http://git.kernel.org/tip/1297667083d5442aafe3e337b9413bf02b114edb Author: Matt Fleming <matt@xxxxxxxxxxxxxxxxxxx> AuthorDate: Mon, 19 Sep 2016 13:09:09 +0100 Committer: Matt Fleming <matt@xxxxxxxxxxxxxxxxxxx> CommitDate: Tue, 20 Sep 2016 14:53:04 +0100 x86/efi: Only map RAM into EFI page tables if in mixed-mode 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@xxxxxxx> Cc: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx> Cc: Borislav Petkov <bp@xxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> CC: Theodore Ts'o <tytso@xxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: Scott J Norton <scott.norton@xxxxxxx> Cc: Douglas Hatch <doug.hatch@xxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> # v4.6+ Signed-off-by: Matt Fleming <matt@xxxxxxxxxxxxxxxxxxx> --- arch/x86/platform/efi/efi_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c index 677e29e..8dd3784 100644 --- a/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c @@ -245,7 +245,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; /* -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |