From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [can-next] can: proc: remove pointers from CAN specific proc output
Date: Fri, 14 Aug 2026 15:52:48 +0200 [thread overview]
Message-ID: <20260814135248.OO4H1uIt@linutronix.de> (raw)
In-Reply-To: <7b538342-0914-409c-a679-87a567d4150e@hartkopp.net>
On 2026-08-14 15:36:03 [+0200], Oliver Hartkopp wrote:
> > > --- a/Documentation/networking/can.rst
> > > +++ b/Documentation/networking/can.rst
> > > @@ -1040,19 +1040,19 @@ As described in :ref:`socketcan-receive-lists` the SocketCAN core uses several f
> > > lists to deliver received CAN frames to CAN protocol modules. These
> > > receive lists, their filters and the count of filter matches can be
> > > checked in the appropriate receive list. All entries contain the
> > > device and a protocol module identifier::
> > > - foo@bar:~$ cat /proc/net/can/rcvlist_all
> > > + foo@bar:~$ cat /proc/net/can/rcvlist_fil
> >
> > Is this _fil a typo?
>
> No, it's a slightly different example.
okay then.
> > > diff --git a/net/can/proc.c b/net/can/proc.c
> > > index de4d05ae3459..b7858fb66178 100644
> > > --- a/net/can/proc.c
> > > +++ b/net/can/proc.c
> > > @@ -189,30 +189,35 @@ static void can_print_rcvlist(struct seq_file *m, struct hlist_head *rx_list,
> > > struct net_device *dev)
> > > {
> > > struct receiver *r;
> > > 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";
> > > + char *fmt;
> > > +#if IS_ENABLED(CONFIG_KALLSYMS)
> >
> > Please don't. I fix %ps and then there is no leak. There will be then
> > the 0 and everything will be fine.
> >
>
> I can wait for your changes before the v2 posting.
>
> Btw. do you think "0" is a good return value, when people expect a function
> name?
>
> What about "(unknown)" or something similar?
Yeah, that '(unknown)' looks slightly better.
> > > + fmt = (r->can_id & CAN_EFF_FLAG)?
> > > + " %6s %08x %08x %8ld %016llx %ps\n" :
> > > + " %6s %03x %08x %8ld %016llx %ps\n";
> > > seq_printf(m, fmt, DNAME(dev), r->can_id, r->mask,
> > > - r->func, r->data, atomic_long_read(&r->matches),
> > > - r->ident);
> > > + atomic_long_read(&r->matches), r->ino, r->func);
> > > +#else
> > > + fmt = (r->can_id & CAN_EFF_FLAG)?
> > > + " %6s %08x %08x %8ld %016llx (unknown)\n" :
> > > + " %6s %03x %08x %8ld %016llx (unknown)\n";
> > > + seq_printf(m, fmt, DNAME(dev), r->can_id, r->mask,
> > > + atomic_long_read(&r->matches), r->ino);
> > > +#endif
> > > }
> > > }
> > …
> >
> > So if you do this now, then I probably should remove that hunk from my
> > patch.
>
> IMHO these /proc/net/can changes go far beyond replacing the pointer values
> with "0".
>
> I hope the
> Suggested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> is ok for your attribution?!?
That is fine. I just mean I should drop that hunk and repost to avoid
the pointless collision here.
> Best regards,
> Oliver
Sebastian
next prev parent reply other threads:[~2026-08-14 13:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 10:54 [can-next] can: proc: remove pointers from CAN specific proc output Oliver Hartkopp
2026-08-14 12:31 ` Sebastian Andrzej Siewior
2026-08-14 13:36 ` Oliver Hartkopp
2026-08-14 13:52 ` Sebastian Andrzej Siewior [this message]
2026-08-14 13:57 ` Oliver Hartkopp
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=20260814135248.OO4H1uIt@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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