[PATCH v5 5/9] efi: Drop the memset() from efi_alloc()

Tom Rini trini at konsulko.com
Mon Dec 2 23:00:58 CET 2024


On Sun, Dec 01, 2024 at 08:28:07AM -0700, Simon Glass wrote:

> From my inspection none of the users need the memory to be zeroed. It
> is somewhat unexpected that it does so, since the name gives no clue to
> this.
> 
> Drop the memset() so that it effectively becomes a wrapper around the
> normal EFI-pool allocator.
> 
> Another option would be to drop this function and call
> efi_allocate_pool() directly, but that increase code size a little.
> 
> Move the function comment to the header file like most other exported
> functions in U-Boot.
> 
> Comments were made in v3 that another project uses memset() when
> allocating memory, but that is not required by the spec. In any case, as
> above, from inspection, none of the users need the memory to be zeroed,
> as they fill the entire region with their own data.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>

I thought you agreed to drop this because Heinrich or Ilias was saying
they'd get the spec clarified to say it should be zeroed?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20241202/5b75ab08/attachment.sig>


More information about the U-Boot mailing list