* [PATCH] efi: fix GetNextDevicePathInstance trace argument
@ 2026-07-09 7:44 Ahmad Fatoum
2026-07-10 21:50 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-07-09 7:44 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Verbose EFI tracing formats device paths with %pD. The
GetNextDevicePathInstance wrapper receives an EFI_DEVICE_PATH **, but passed
that pointer slot directly to %pD. When the SCT called the service, the trace
formatter interpreted stack bytes as a device path and could loop before the
service body was reached.
Log the pointed-to device path when the argument itself is present. This keeps
the trace useful while avoiding a tracing-induced hang during the Device Path
Utilities ACS coverage.
Assisted-by: Codex:gpt-5.5
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
efi/loader/protocols/device_path_utilities.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/efi/loader/protocols/device_path_utilities.c b/efi/loader/protocols/device_path_utilities.c
index ef88e2d647fb..8788149f6de4 100644
--- a/efi/loader/protocols/device_path_utilities.c
+++ b/efi/loader/protocols/device_path_utilities.c
@@ -143,7 +143,8 @@ static struct efi_device_path * EFIAPI get_next_device_path_instance(
struct efi_device_path **device_path_instance,
efi_uintn_t *device_path_instance_size)
{
- EFI_ENTRY("%pD, %p", device_path_instance, device_path_instance_size);
+ EFI_ENTRY("%pD, %p", device_path_instance ? *device_path_instance : NULL,
+ device_path_instance_size);
return EFI_EXIT(efi_dp_get_next_instance(device_path_instance,
device_path_instance_size));
}
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] efi: fix GetNextDevicePathInstance trace argument
2026-07-09 7:44 [PATCH] efi: fix GetNextDevicePathInstance trace argument Ahmad Fatoum
@ 2026-07-10 21:50 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2026-07-10 21:50 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Thu, 09 Jul 2026 09:44:28 +0200, Ahmad Fatoum wrote:
> Verbose EFI tracing formats device paths with %pD. The
> GetNextDevicePathInstance wrapper receives an EFI_DEVICE_PATH **, but passed
> that pointer slot directly to %pD. When the SCT called the service, the trace
> formatter interpreted stack bytes as a device path and could loop before the
> service body was reached.
>
> Log the pointed-to device path when the argument itself is present. This keeps
> the trace useful while avoiding a tracing-induced hang during the Device Path
> Utilities ACS coverage.
>
> [...]
Applied, thanks!
[1/1] efi: fix GetNextDevicePathInstance trace argument
https://git.pengutronix.de/cgit/barebox/commit/?id=294a67a596fb (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-10 21:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-09 7:44 [PATCH] efi: fix GetNextDevicePathInstance trace argument Ahmad Fatoum
2026-07-10 21:50 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox