On 05.08.2025 18:32, Ross Lagerwall wrote:
> If the config file is builtin, cfg.addr will be zero but Xen
> unconditionally calls FreePages() on the address.
> 
> Xen may also call FreePages() with a zero address if blexit() is called
> after this point since cfg.need_to_free is not set to false.
> 
> The UEFI specification does not say whether calling FreePages() with a
> zero address is allowed so let's be cautious and use cfg.need_to_free
> properly.

Well, no, this paragraph makes no sense. Of course this is allowed, but
not as no-op behavior (like free(NULL) would be), but to free memory
starting at 0.

> Signed-off-by: Ross Lagerwall <ross.lagerw...@citrix.com>

This pretty clearly wants a Fixes: tag, or maybe it even needs to be two.
I've checked the original code in 4.2, and things were consistent there,
afaics. So breakage was introduced perhaps in one or two of the many
re-works.

Jan

Reply via email to