Commit-ID: 1acba98f810a14b1255e34bc620594f83de37e36 Gitweb: http://git.kernel.org/tip/1acba98f810a14b1255e34bc620594f83de37e36 Author: Matthew Garrett <matthew.garrett@xxxxxxxxxx> AuthorDate: Sun, 2 Jun 2013 18:12:25 -0400 Committer: Matt Fleming <matt.fleming@xxxxxxxxx> CommitDate: Thu, 6 Jun 2013 14:28:11 +0100 UEFI: Don't pass boot services regions to SetVirtualAddressMap() We need to map boot services regions during startup in order to avoid firmware bugs, but we shouldn't be passing those regions to SetVirtualAddressMap(). Ensure that we're only passing regions that are marked as being mapped at runtime. Signed-off-by: Matthew Garrett <matthew.garrett@xxxxxxxxxx> Signed-off-by: Matt Fleming <matt.fleming@xxxxxxxxx> --- arch/x86/platform/efi/efi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 55856b2..339e11f 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c @@ -1026,6 +1026,13 @@ void __init efi_enter_virtual_mode(void) va = efi_ioremap(md->phys_addr, size, md->type, md->attribute); + if (!(md->attribute & EFI_MEMORY_RUNTIME)) { + if (!va) + pr_err("ioremap of 0x%llX failed!\n", + (unsigned long long)md->phys_addr); + continue; + } + md->virt_addr = (u64) (unsigned long) va; if (!va) { -- 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