[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 7/7] efi: change heap allocation type to GRUB_EFI_LOADER_CODE
From: |
Leif Lindholm |
Subject: |
[PATCH 7/7] efi: change heap allocation type to GRUB_EFI_LOADER_CODE |
Date: |
Tue, 28 Feb 2017 22:35:37 +0000 |
With upcoming changes to EDK2, allocations of type EFI_LOADER_DATA may
not return regions with execute ability. Since modules are loaded onto
the heap, change the heap allocation type to GRUB_EFI_LOADER_CODE in
order to permit execution on systems with this feature enabled.
Closes: 50420
Signed-off-by: Leif Lindholm <address@hidden>
---
grub-core/kern/efi/mm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
index 7b1763bc5..f27a48e68 100644
--- a/grub-core/kern/efi/mm.c
+++ b/grub-core/kern/efi/mm.c
@@ -404,7 +404,9 @@ add_memory_regions (grub_efi_memory_descriptor_t
*memory_map,
pages = required_pages;
}
- addr = grub_efi_allocate_pages (start, pages);
+ addr = grub_efi_allocate_pages_real (start, pages,
+ GRUB_EFI_ALLOCATE_ADDRESS,
+ GRUB_EFI_LOADER_CODE);
if (! addr)
grub_fatal ("cannot allocate conventional memory %p with %u pages",
(void *) ((grub_addr_t) start),
--
2.11.0
- [PATCH 0/7] efi: improved correctness, arm unification, and cleanup, Leif Lindholm, 2017/02/28
- [PATCH 2/7] efi: refactor grub_efi_allocate_pages, Leif Lindholm, 2017/02/28
- [PATCH 1/7] efi: add grub_efi_get_dram_base() function for arm*, Leif Lindholm, 2017/02/28
- [PATCH 3/7] efi: move fdt helper library, Leif Lindholm, 2017/02/28
- [PATCH 6/7] efi: restrict arm/arm64 linux loader initrd placement, Leif Lindholm, 2017/02/28
- [PATCH 4/7] arm64: make efi linux loader more generic, Leif Lindholm, 2017/02/28
- [PATCH 7/7] efi: change heap allocation type to GRUB_EFI_LOADER_CODE,
Leif Lindholm <=
- [PATCH 5/7] arm: reuse arm64 linux loader on efi systems, Leif Lindholm, 2017/02/28
- Re: [PATCH 0/7] efi: improved correctness, arm unification, and cleanup, Vladimir 'phcoder' Serbinenko, 2017/02/28