mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH] efi: fix GetNextDevicePathInstance trace argument
Date: Thu,  9 Jul 2026 09:44:28 +0200	[thread overview]
Message-ID: <20260709074429.534460-1-a.fatoum@barebox.org> (raw)

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




             reply	other threads:[~2026-07-09  7:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09  7:44 Ahmad Fatoum [this message]
2026-07-10 21:50 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260709074429.534460-1-a.fatoum@barebox.org \
    --to=a.fatoum@barebox.org \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox