From: sashiko-bot@kernel.org
To: "Sebastian Andrzej Siewior" <bigeasy@linutronix.de>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next] selftests/bpf: Replace %pK output with 0
Date: Fri, 11 Sep 2026 15:03:37 +0000 [thread overview]
Message-ID: <20260911150338.91D3E1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260911145011.kErTVDkS@linutronix.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Incorrect replacement of `%pK` with padded format specifier `%8d` for UDP sockets causes a mismatch with native `/proc/net/` output.
--
commit c1f7209e53e018927a70341e583a110e2a63d48e
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
selftests/bpf: Replace %pK output with 0
This commit replaces the %pK format modifier with 0 in BPF iterator tests to
match a recent change in the networking subsystem. The socket pointers are
removed from the output formatting to align with native /proc/net/ interfaces.
> diff --git a/tools/testing/selftests/bpf/progs/bpf_iter_udp4.c b/tools/testing/selftests/bpf/progs/bpf_iter_udp4.c
> index 23b2aa2604de2..9b789f09f1462 100644
> --- a/tools/testing/selftests/bpf/progs/bpf_iter_udp4.c
> +++ b/tools/testing/selftests/bpf/progs/bpf_iter_udp4.c
> @@ -57,13 +57,13 @@ int dump_udp4(struct bpf_iter__udp *ctx)
> BPF_SEQ_PRINTF(seq, "%5d: %08X:%04X %08X:%04X ",
> ctx->bucket, src, srcp, dest, destp);
>
> - BPF_SEQ_PRINTF(seq, "%02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %u\n",
> + BPF_SEQ_PRINTF(seq, "%02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %8d %u\n",
[Severity: Low]
Does this %8d format incorrectly pad the 0 with spaces?
The networking subsystem replaced %pK with a literal 0, but replacing it with
%8d here in dump_udp4() causes a mismatch with the native /proc/net/ output.
Since BPF iterators are designed as exact drop-in replacements, could this
mismatch break parsers that rely on strict spacing?
[ ... ]
> diff --git a/tools/testing/selftests/bpf/progs/bpf_iter_udp6.c b/tools/testing/selftests/bpf/progs/bpf_iter_udp6.c
> index c48b05aa2a4b2..9766eff7069ff 100644
> --- a/tools/testing/selftests/bpf/progs/bpf_iter_udp6.c
> +++ b/tools/testing/selftests/bpf/progs/bpf_iter_udp6.c
> @@ -65,13 +65,13 @@ int dump_udp6(struct bpf_iter__udp *ctx)
> dest->s6_addr32[0], dest->s6_addr32[1],
> dest->s6_addr32[2], dest->s6_addr32[3], destp);
>
> - BPF_SEQ_PRINTF(seq, "%02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %u\n",
> + BPF_SEQ_PRINTF(seq, "%02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %8d %u\n",
[Severity: Low]
Is the use of %8d here in dump_udp6() introducing the same formatting
mismatch as in dump_udp4()?
It seems it should use a literal 0 instead of %8d to exactly match the
networking subsystem's native output format.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260911145011.kErTVDkS@linutronix.de?part=1
next prev parent reply other threads:[~2026-09-11 15:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 14:50 [PATCH bpf-next] selftests/bpf: Replace %pK output with 0 Sebastian Andrzej Siewior
2026-09-11 15:03 ` sashiko-bot [this message]
2026-09-11 15:41 ` bot+bpf-ci
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=20260911150338.91D3E1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=bpf@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.