Skip to contentSkip to conversation

Patch "x86/efi: Only map RAM into EFI page tables if in mixed-mode" has been added to the 4.7-stable tree

PATCH [email protected] 1 participant 1 message Sep 27, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

x86/efi: Only map RAM into EFI page tables if in mixed-mode

to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
x86-efi-only-map-ram-into-efi-page-tables-if-in-mixed-mode.patch
and it can be found in the queue-4.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 1297667083d5442aafe3e337b9413bf02b114edb Mon Sep 17 00:00:00 2001

From: Matt Fleming <[email protected]>
Date: Mon, 19 Sep 2016 13:09:09 +0100
Subject: x86/efi: Only map RAM into EFI page tables if in mixed-mode

From: Matt Fleming <[email protected]>

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.

Cc Ard Biesheuvel <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Linus Torvalds <[email protected]>
CC Theodore Ts'o <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Scott J Norton <[email protected]>
Cc Douglas Hatch <[email protected]>
---
 arch/x86/platform/efi/efi_64.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/platform/efi/efi_64.c +1 -1
@@ -244,7 +244,7 @@ int __init efi_setup_page_tables(unsigne
 	 * 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;
 
 	/*

Patches currently in stable-queue which might be from [email protected] are

queue-4.7/x86-efi-only-map-ram-into-efi-page-tables-if-in-mixed-mode.patch