From: sashiko-bot@kernel.org
To: "Sebastian Andrzej Siewior" <bigeasy@linutronix.de>
Cc: "Oleksij Rempel" <o.rempel@pengutronix.de>,
linux-can@vger.kernel.org,
"Marc Kleine-Budde" <mkl@pengutronix.de>,
"Oliver Hartkopp" <socketcan@hartkopp.net>,
"Vincent Mailhol" <mailhol@kernel.org>
Subject: Re: [PATCH net-next v2] net: Replace %pK output with 0
Date: Tue, 21 Jul 2026 14:40:43 +0000 [thread overview]
Message-ID: <20260721144043.B96EA1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260720144031.oU6azheV@linutronix.de>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Critical] Missing placeholder for `%pK` in `/proc/net/tcp6` for TIME_WAIT sockets breaks column count.
- [Low] The format string for CAN EFF frames uses `%ps` without a width specifier, breaking column alignment.
--
--- Patch [1]: [PATCH net-next v2] net: Replace %pK output with 0 ---
commit 43254de7fd1d6d9709d84bcd9bfd332145fe505b
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
net: Replace %pK output with 0
Replace the %pK annotation with a 0 value to avoid exposing socket pointers,
and correct spacing for cases where the pointer is at the beginning.
> diff --git a/net/can/proc.c b/net/can/proc.c
> index de4d05ae34597..cc3050f4c8e75 100644
> --- a/net/can/proc.c
> +++ b/net/can/proc.c
> @@ -192,12 +192,11 @@ static void can_print_rcvlist(struct seq_file *m, struct hlist_head *rx_list,
>
> hlist_for_each_entry_rcu(r, rx_list, list) {
> char *fmt = (r->can_id & CAN_EFF_FLAG)?
> - " %-5s %08x %08x %pK %pK %8ld %s\n" :
> - " %-5s %03x %08x %pK %pK %8ld %s\n";
> + " %-5s %08x %08x %ps %8u %8ld %s\n" :
> + " %-5s %03x %08x %-20ps %8u %8ld %s\n";
[Severity: Low]
Does the missing %-20 width specifier in the CAN_EFF_FLAG branch break column
alignment?
The non-EFF branch uses %-20ps, but the EFF branch only uses %ps, which might
cause subsequent columns to be misaligned depending on the length of the symbol
name when reading /proc/net/can/rcvlist_*.
[ ... ]
> diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
> index 522ba45ce9b75..bc45e647c4956 100644
> --- a/net/ipv6/tcp_ipv6.c
> +++ b/net/ipv6/tcp_ipv6.c
[ ... ]
> @@ -2209,7 +2209,7 @@ static void get_timewait6_sock(struct seq_file *seq,
>
> seq_printf(seq,
> "%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X "
> - "%02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %pK\n",
> + "%02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d\n",
[Severity: Critical]
Does removing this %pK placeholder completely instead of replacing it with a 0
break the column count in /proc/net/tcp6 for TIME_WAIT sockets?
Unlike other socket states and the IPv4 equivalent where the pointer is
replaced with 0, this drops the column entirely. Could this cause userspace
parsers relying on whitespace separation to fail or parse incorrect data?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260720144031.oU6azheV@linutronix.de?part=1
prev parent reply other threads:[~2026-07-21 14:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 14:40 [PATCH net-next v2] net: Replace %pK output with 0 Sebastian Andrzej Siewior
2026-07-21 14:40 ` sashiko-bot [this message]
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=20260721144043.B96EA1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=mailhol@kernel.org \
--cc=mkl@pengutronix.de \
--cc=o.rempel@pengutronix.de \
--cc=sashiko-reviews@lists.linux.dev \
--cc=socketcan@hartkopp.net \
/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