]> Git Repo - linux.git/commit - include/linux/efi.h
efi/libstub: Allocate headspace in efi_get_memory_map()
authorJeffrey Hugo <[email protected]>
Mon, 29 Aug 2016 20:38:51 +0000 (14:38 -0600)
committerMatt Fleming <[email protected]>
Mon, 5 Sep 2016 11:18:17 +0000 (12:18 +0100)
commitdadb57abc37499f565b23933dbf49b435c3ba8af
tree80721c262bfd0a51f3448b09d6a4b392701f2202
parent4af9ed578a50cd331a725322cfd9d555251ce788
efi/libstub: Allocate headspace in efi_get_memory_map()

efi_get_memory_map() allocates a buffer to store the memory map that it
retrieves.  This buffer may need to be reused by the client after
ExitBootServices() is called, at which point allocations are not longer
permitted.  To support this usecase, provide the allocated buffer size back
to the client, and allocate some additional headroom to account for any
reasonable growth in the map that is likely to happen between the call to
efi_get_memory_map() and the client reusing the buffer.

Signed-off-by: Jeffrey Hugo <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Leif Lindholm <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: <[email protected]>
Signed-off-by: Matt Fleming <[email protected]>
arch/x86/boot/compressed/eboot.c
drivers/firmware/efi/libstub/efi-stub-helper.c
drivers/firmware/efi/libstub/fdt.c
drivers/firmware/efi/libstub/random.c
include/linux/efi.h
This page took 0.048793 seconds and 4 git commands to generate.