u-boot/lib
Stefan Brüns b61d857b2f efi_loader: Readd freed pages to memory pool
Currently each allocation creates a new mapping. Readding the mapping
as free memory (EFI_CONVENTIONAL_MEMORY) potentially allows to hand out
an existing mapping, thus limiting the number of mapping descriptors in
the memory map.

Mitigates a problem with current (4.8rc7) linux kernels when doing an
efi_get_memory map, resulting in an infinite loop. Space for the memory
map is reserved with allocate_pool (implicitly creating a new mapping) and
filled. If there is insufficient slack space (8 entries) in the map, the
space is freed and a new round is started, with space for one more entry.
As each round increases requirement and allocation by exactly one, there
is never enough slack space. (At least 32 entries are allocated, so as
long as there are less than 24 entries, there is enough slack).
Earlier kernels reserved no slack, and did less allocations, so this
problem was not visible.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2016-10-18 09:08:07 +02:00
..
bzip2 bzlib: Try another way to fix an unused variable 2016-02-06 13:59:48 +01:00
dhry cmd_dhry.c: Use lldiv for vax_mips calculation as well 2016-03-17 10:14:25 -04:00
efi x86: efi: payload: Make EFI payload build again 2016-08-30 09:26:05 +08:00
efi_loader efi_loader: Readd freed pages to memory pool 2016-10-18 09:08:07 +02:00
libfdt libfdt: Drop inlining of fdt_path_offset() 2016-10-13 14:12:40 -06:00
lzma lzma: fix buffer bound check error further 2015-01-14 11:35:43 -05:00
lzo lib/lzo: bugfix when input data is not compressed 2016-06-24 17:23:11 -04:00
rsa treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
tizen exynos: Allow tizen to be built without an LCD 2016-05-25 13:25:18 +09:00
zlib Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
Kconfig spl: move FDT_FIXUP_PARTITIONS to Kconfig 2016-10-15 08:12:46 -04:00
Makefile spl: saveenv: adding saveenv support in SPL 2016-10-08 09:33:36 -04:00
addr_map.c Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
aes.c aes: make apply_cbc_chain_data non-static 2014-04-18 16:14:17 -04:00
asm-offsets.c lib/asm-offsets - make GD_RELOCADDR, GD_RELOC_OFF & GD_START_ADDR_SP available for all architectures 2015-03-05 20:50:28 -05:00
bch.c Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
bitrev.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
circbuf.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
crc7.c lib: add crc7 from Linux 2011-01-18 23:38:08 +01:00
crc8.c lib/crc8: Add crc start value 2016-04-11 20:48:26 -04:00
crc16.c lib/crc16.c: Rename cyg_crc16() to crc16_ccitt() and add crc start value 2016-03-14 19:18:42 -04:00
crc32.c crc32: Correct endianness of crc32 result 2013-04-19 10:24:14 -04:00
ctype.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
display_options.c Drop config.h header from display_options.c 2015-11-19 20:27:50 -07:00
div64.c lib: Don't instrument the div64 function 2016-02-26 08:53:10 -07:00
errno.c Add basic errno support. 2010-09-19 19:29:47 +02:00
errno_str.c lib: errno: introduce errno_str(): returns errno related message 2014-12-11 13:18:41 -07:00
fdtdec.c libfdt: Sync fdt_for_each_subnode() with upstream 2016-10-13 14:10:32 -06:00
fdtdec_common.c lib, fdt: Adding fdtdec_get_uint function 2015-11-05 02:34:14 +01:00
fdtdec_test.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
gunzip.c gunzip: cache-align write buffer memory 2016-10-06 20:57:33 -04:00
gzip.c Move malloc_cache_aligned() to its own header 2015-09-11 17:15:16 -04:00
hang.c Change my mailaddress 2016-05-02 18:37:09 -04:00
hashtable.c spl: saveenv: adding saveenv support in SPL 2016-10-08 09:33:36 -04:00
initcall.c efi: Display the correct initcall pre-relocation values 2015-08-05 08:42:41 -06:00
ldiv.c Add LGPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:45:01 -04:00
linux_compat.c linux_compat: handle __GFP_ZERO in kmalloc() 2015-07-22 07:30:44 -06:00
linux_string.c Make linux kernel string funcs available to tools 2012-12-13 11:46:07 -07:00
list_sort.c kbuild: force to define __UBOOT__ in all the C sources 2014-09-16 12:23:56 -04:00
lmb.c lmb: make local functions static 2014-10-25 07:02:01 -04:00
lz4.c Add support for LZ4 decompression algorithm 2015-10-11 17:12:10 -04:00
lz4_wrapper.c Fix sandbox build on Ubuntu 10.04 2015-11-18 15:28:59 -05:00
md5.c GCC47: Fix warning in md5.c 2012-04-29 14:14:08 +02:00
membuff.c Add a circular memory buffer implementation 2015-11-19 20:27:50 -07:00
net_utils.c net: cosmetic: Change IPaddr_t to struct in_addr 2015-04-18 11:11:32 -06:00
panic.c lib: Split panic functions out of vsprintf.c 2015-12-13 17:07:30 -07:00
physmem.c lib/physmem.c: Switch to __weak for arch_phys_memset 2016-04-01 17:17:43 -04:00
qsort.c Include common.h in qsort.c to fix build warning 2011-12-07 08:39:54 +01:00
rand.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
rbtree.c kbuild: force to define __UBOOT__ in all the C sources 2014-09-16 12:23:56 -04:00
rc4.c Add rivest cipher 4 (rc4) implementation 2015-07-21 17:39:28 -06:00
sha1.c Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
sha256.c includes: move openssl headers to include/u-boot 2014-06-19 11:19:04 -04:00
slre.c Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
string.c Remove unneeded remnants of bcopy(). 2016-06-06 13:39:18 -04:00
strmhz.c replace DIV_ROUND with DIV_ROUND_CLOSEST 2014-11-20 11:28:25 -05:00
strto.c Fix return value in trailing_strtoln() 2016-10-11 11:55:33 +08:00
time.c timer: Provide an early timer 2016-02-26 08:53:10 -07:00
tiny-printf.c tiny-printf: Adjust to avoid using data section 2016-08-08 13:32:59 -04:00
tpm.c dm: Use uclass_first_device_err() where it is useful 2016-03-14 15:34:50 -06:00
trace.c common: Make sure arch-specific map_sysmem() is defined 2015-04-18 11:11:09 -06:00
uuid.c uuid: add selection by string for known partition type GUID 2015-11-12 15:58:58 -05:00
vsprintf.c vsprintf.c: Always enable CONFIG_SYS_VSNPRINTF 2016-01-19 08:31:16 -05:00