[3.13.y-ckt stable] Patch "x86/efi: Use all 64 bit of efi_memmap in setup_e820()" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Wed Sep 2 00:55:47 UTC 2015


This is a note to let you know that I have just added a patch titled

    x86/efi: Use all 64 bit of efi_memmap in setup_e820()

to the linux-3.13.y-queue branch of the 3.13.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.13.y-queue

This patch is scheduled to be released in version 3.13.11-ckt26.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 92fe1a6a60a79641eb06fbc828909d5e6808fe33 Mon Sep 17 00:00:00 2001
From: Dmitry Skorodumov <sdmitry at parallels.com>
Date: Tue, 28 Jul 2015 18:38:32 +0400
Subject: x86/efi: Use all 64 bit of efi_memmap in setup_e820()

commit 7cc03e48965453b5df1cce5062c826189b04b960 upstream.

The efi_info structure stores low 32 bits of memory map
in efi_memmap and high 32 bits in efi_memmap_hi.

While constructing pointer in the setup_e820(), need
to take into account all 64 bit of the pointer.

It is because on 64bit machine the function
efi_get_memory_map() may return full 64bit pointer and before
the patch that pointer was truncated.

The issue is triggered on Parallles virtual machine and
fixed with this patch.

Signed-off-by: Dmitry Skorodumov <sdmitry at parallels.com>
Cc: Denis V. Lunev <den at openvz.org>
Signed-off-by: Matt Fleming <matt.fleming at intel.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 arch/x86/boot/compressed/eboot.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index 3f88561..3898595 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -561,6 +561,10 @@ static efi_status_t setup_e820(struct boot_params *params,
 		unsigned int e820_type = 0;
 		unsigned long m = efi->efi_memmap;

+#ifdef CONFIG_X86_64
+		m |= (u64)efi->efi_memmap_hi << 32;
+#endif
+
 		d = (efi_memory_desc_t *)(m + (i * efi->efi_memdesc_size));
 		switch (d->type) {
 		case EFI_RESERVED_TYPE:
--
1.9.1





More information about the kernel-team mailing list