<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/lib/efi_loader, branch v2026.07</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/lib/efi_loader?h=v2026.07</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/lib/efi_loader?h=v2026.07'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2026-06-21T08:51:48Z</updated>
<entry>
<title>lib/efi_loader: fix block io revision</title>
<updated>2026-06-21T08:51:48Z</updated>
<author>
<name>Vincent Stehlé</name>
<email>vincent.stehle@arm.com</email>
</author>
<published>2026-06-09T08:07:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=41c6b83c777788692640fa0f85a2381d8959f301'/>
<id>urn:sha1:41c6b83c777788692640fa0f85a2381d8959f301</id>
<content type='text'>
The Revision field of the EFI_BLOCK_IO_PROTOCOL structure must be set to
one of the two valid values [1], but this is not initialized in the
efi_loader; fix it.

Link: https://uefi.org/specs/UEFI/2.11/13_Protocols_Media_Access.html#efi-block-io-protocol [1]
Signed-off-by: Vincent Stehlé &lt;vincent.stehle@arm.com&gt;
Cc: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Cc: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
</entry>
<entry>
<title>efi_loader: fix memory leak in efi_var_collect</title>
<updated>2026-06-21T08:25:08Z</updated>
<author>
<name>Ilias Apalodimas</name>
<email>ilias.apalodimas@linaro.org</email>
</author>
<published>2026-06-19T08:38:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1f5c8eac2f299bd3a2fc748b068acbb4b90d592d'/>
<id>urn:sha1:1f5c8eac2f299bd3a2fc748b068acbb4b90d592d</id>
<content type='text'>
Barebox has now ported some of the UEFI code. In the process
they found some bugs.

In this case when the variable buffer is too small, efi_var_collect()
returns EFI_BUFFER_TOO_SMALL but doesn't free the allocated 'buf'.

Fixes: 5f7dcf079de8c ("efi_loader: UEFI variable persistence")
Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Reviewed-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
</entry>
<entry>
<title>efi_loader: validate PE-COFF relocation data</title>
<updated>2026-06-07T14:43:06Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2026-06-01T13:20:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=bc82aa5b4145eba47f57e6f7148e0fa45bc16f51'/>
<id>urn:sha1:bc82aa5b4145eba47f57e6f7148e0fa45bc16f51</id>
<content type='text'>
When applying base relocations from a PE-COFF binary all data must
be treated as untrusted. Add the following checks to
efi_loader_relocate():

* Reject relocation blocks that don't start on a 32-bit aligned
  address.
* Reject relocation blocks whose SizeOfBlock is smaller than the
  block header, which would cause an unsigned underflow when computing
  the entry count.
* A block with SizeOfBlock == 0 is invalid and does not mark the end of
  the relocation table.
* Reject relocation blocks that extend beyond the end of the
  relocation section.
* Reject individual relocation entries whose target offset, together
  with the access width, exceeds the mapped image size, preventing
  out-of-bounds writes.

Pass virt_size to efi_loader_relocate() from efi_load_pe() to enable
the per-entry bounds check.

Reported-by: Anas Cherni &lt;anas@calif.io&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
</entry>
<entry>
<title>efi_loader: fix hii keyboard layout pointer computation</title>
<updated>2026-05-18T06:38:16Z</updated>
<author>
<name>Vincent Stehlé</name>
<email>vincent.stehle@arm.com</email>
</author>
<published>2026-05-12T17:40:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ec95a60d9dcd9436faa08f8151f05e4bba8e14a0'/>
<id>urn:sha1:ec95a60d9dcd9436faa08f8151f05e4bba8e14a0</id>
<content type='text'>
The EFI_HII_KEYBOARD_LAYOUT field `layout_length' is expressed in bytes,
but we add it to the `layout' pointer with (scaled) pointer arithmetic.
When adding an HII keyboard package with multiple keyboard layouts, this
results in only the first layout being added correctly; fix it.

Fixes: 8d3b77e36e10 ("efi: hii: add keyboard layout package support")
Signed-off-by: Vincent Stehlé &lt;vincent.stehle@arm.com&gt;
Cc: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Cc: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: AKASHI Takahiro &lt;akashi.tkhro@gmail.com&gt;
</content>
</entry>
<entry>
<title>efi_loader: fix AllocatePages overlap status</title>
<updated>2026-05-18T06:32:58Z</updated>
<author>
<name>Harsimran Singh Tungal</name>
<email>harsimransingh.tungal@arm.com</email>
</author>
<published>2026-04-27T15:05:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d0d1c4a4f5d13c8dd792d5cc5379eb4c1e0f0c46'/>
<id>urn:sha1:d0d1c4a4f5d13c8dd792d5cc5379eb4c1e0f0c46</id>
<content type='text'>
Return EFI_NOT_FOUND for EFI_ALLOCATE_ADDRESS overlap

When efi_allocate_pages() is called with EFI_ALLOCATE_ADDRESS, UEFI
expects EFI_NOT_FOUND if the requested address range is already
allocated or unavailable. U-Boot currently returns
EFI_OUT_OF_RESOURCES when efi_update_memory_map() detects an overlap
after a successful lmb_alloc_mem(), which does not match
EFI_ALLOCATE_ADDRESS semantics.

Return EFI_NOT_FOUND for EFI_ALLOCATE_ADDRESS requests that fail due
to an overlapping EFI memory descriptor, while keeping
EFI_OUT_OF_RESOURCES for other allocation types.

The UEFI specification [1] specifies that
EFI_BOOT_SERVICES.AllocatePages must return EFI_NOT_FOUND when the
requested address range is unavailable or already allocated;
EFI_OUT_OF_RESOURCES applies to non‑address‑specific allocation
failures.

[1] https://uefi.org/specs/UEFI/2.10_A/07_Services_Boot_Services.html

Signed-off-by: Harsimran Singh Tungal &lt;harsimransingh.tungal@arm.com&gt;

The UEFI specification does not clearly specify the behavior.
But let's follow the EDK II precedent here.

Reviewed-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
</entry>
<entry>
<title>efi_mem_sort: use list_for_each_entry_safe instead</title>
<updated>2026-05-05T14:29:08Z</updated>
<author>
<name>Randolph Sapp</name>
<email>rs@ti.com</email>
</author>
<published>2026-04-22T17:09:45Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b1c28ad5fafd95c183b26165e498354db41b755b'/>
<id>urn:sha1:b1c28ad5fafd95c183b26165e498354db41b755b</id>
<content type='text'>
Use list_for_each_entry_safe and comparisons against the current and
next efi_mem_desc. This reduces the computation required for merging
regions, prevents unnecessary additional iterations of the list, and
requires less temporary values.

Signed-off-by: Randolph Sapp &lt;rs@ti.com&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>efi_dt_fixup: use fdtdec_get_bool</title>
<updated>2026-05-05T14:29:08Z</updated>
<author>
<name>Randolph Sapp</name>
<email>rs@ti.com</email>
</author>
<published>2026-04-22T17:09:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3ad3243f8a062c0a14adcb645c83f45b55eaeab9'/>
<id>urn:sha1:3ad3243f8a062c0a14adcb645c83f45b55eaeab9</id>
<content type='text'>
Use the more straightforward fdtdec_get_bool instead of fdt_getprop and
a return code check.

Signed-off-by: Randolph Sapp &lt;rs@ti.com&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Reviewed-by: Anshul Dalal &lt;anshuld@ti.com&gt;
Reviewed-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>efi_loader: initialize variables in efi_dp_from_http()</title>
<updated>2026-05-05T14:29:08Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2026-04-29T15:40:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=28980318032ea19031f0a739221e24f1ad87a09c'/>
<id>urn:sha1:28980318032ea19031f0a739221e24f1ad87a09c</id>
<content type='text'>
When using lwIP, efi_dp_from_http() may fail to initialize ip or mask.
Initialize the variables before the call.

Addresses-Coverity-ID: 645840 - Uninitialized variables (UNINIT)
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
</entry>
<entry>
<title>efi_loader: centralize messaging for efi_init_obj_list</title>
<updated>2026-05-01T08:30:03Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2026-04-20T22:03:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=82539af483175e076f3727b51e23dff020eeec41'/>
<id>urn:sha1:82539af483175e076f3727b51e23dff020eeec41</id>
<content type='text'>
If efi_init_obj_list() fails we cannot use the UEFI sub-system.

* Instead of having messages for this everywhere write an error message
  in efi_init_obj_list().
* Always use (ret != EFI_SUCCESS) when checking the return value of
  efi_init_obj_list().
* Remove the return code from the error message as it does not help
  users to understand which initialization went wrong.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
</entry>
<entry>
<title>efi_loader: correct efi_binary_run_dp() return value</title>
<updated>2026-05-01T08:30:03Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2026-04-20T22:03:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=257f9f52738641f8981b3ccb17d56567d145a084'/>
<id>urn:sha1:257f9f52738641f8981b3ccb17d56567d145a084</id>
<content type='text'>
efi_binary_run_dp() is expected to return an efi_status_t value.

Reported-by: Simon Glass &lt;sjg@chromium.org&gt;
Fixes: 6422820ac3e5 ("efi_loader: split unrelated code from efi_bootmgr.c")
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
</entry>
</feed>
