linux/drivers/firmware/efi/libstub
Ard Biesheuvel a643375f4b efi/libstub: Retrieve FDT size when loaded from UEFI config table
When allocating memory for the copy of the FDT that the stub
modifies and passes to the kernel, it uses the current size as
an estimate of how much memory to allocate, and increases it page
by page if it turns out to be too small. However, when loading
the FDT from a UEFI configuration table, the estimated size is
left at its default value of zero, and the allocation loop runs
starting from zero all the way up to the allocation size that
finally fits the updated FDT.

Instead, retrieve the size of the FDT from the FDT header when
loading it from the UEFI config table.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Roy Franz <roy.franz@linaro.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2015-04-01 12:46:23 +01:00
..
Makefile kasan: add kernel address sanitizer infrastructure 2015-02-13 21:21:40 -08:00
arm-stub.c efi/libstub: Retrieve FDT size when loaded from UEFI config table 2015-04-01 12:46:23 +01:00
efi-stub-helper.c * Fix regression in DMI sysfs code for handling "End of Table" entry 2015-03-02 14:18:57 +01:00
efistub.h efi/libstub: Retrieve FDT size when loaded from UEFI config table 2015-04-01 12:46:23 +01:00
fdt.c efi/libstub: Retrieve FDT size when loaded from UEFI config table 2015-04-01 12:46:23 +01:00