[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 1/5] efi/boot.c: add file.need_to_free



On 29.09.2020 20:17, Trammell Hudson wrote:
> The config file, kernel, initrd, etc should only be freed if they
> are allocated with the UEFI allocator.  On x86 the ucode, and on
> ARM the dtb, are also marked as need_to_free.
> 
> Signed-off-by: Trammell Hudson <hudson@xxxxxxxx>

non-Arm parts:
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

> --- a/xen/arch/arm/efi/efi-boot.h
> +++ b/xen/arch/arm/efi/efi-boot.h
> @@ -546,7 +546,7 @@ static void __init efi_arch_cpu(void)
>  
>  static void __init efi_arch_blexit(void)
>  {
> -    if ( dtbfile.addr && dtbfile.size )
> +    if ( dtbfile.need_to_free )
>          efi_bs->FreePages(dtbfile.addr, PFN_UP(dtbfile.size));
>      if ( memmap )
>          efi_bs->FreePool(memmap);

I'm afraid this isn't enough of a change for Arm, due to what
fdt_increase_size() may do.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.