From: Andrew Lunn <andrew@lunn.ch>
To: Jason Xing <kerneljasonxing@gmail.com>
Cc: Peilin Ye <yepeilin.cs@gmail.com>,
davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org,
kuba@kernel.org, pabeni@redhat.com, ast@kernel.org,
daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com,
songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com,
kpsingh@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
Jason Xing <xingwanli@kuaishou.com>
Subject: Re: [PATCH net-next] net: use the %px format to display sock
Date: Sat, 7 May 2022 16:22:07 +0200 [thread overview]
Message-ID: <YnaAj1FoaBVnVzgt@lunn.ch> (raw)
In-Reply-To: <CAL+tcoBwQ2tijfzwOO6zb2MobCL27PcyN3foRcAw91MpyWg_VA@mail.gmail.com>
On Sat, May 07, 2022 at 09:26:07AM +0800, Jason Xing wrote:
> On Sat, May 7, 2022 at 2:56 AM Peilin Ye <yepeilin.cs@gmail.com> wrote:
> >
> > Hi Jason,
> >
> > On Thu, May 05, 2022 at 09:08:26PM +0800, kerneljasonxing@gmail.com wrote:
> > > - pr_err("Attempt to release TCP socket in state %d %p\n",
> > > + pr_err("Attempt to release TCP socket in state %d %px\n",
> >
> > I think we cannot use %px here for security reasons? checkpatch is also
> > warning about it:
> >
>
> I noticed this warning before submitting. Since the %p format doesn't
> print the real address, printing the address here will be helpless and
> we cannot trace what exactly the bad socket is.
>
> What do you suggest?
How is a socket identified in places like /proc/<PID>/net/tcp ?
Could you print the local and remote port to identify the socket?
How does the address of the structure actually help you? Do you see
this address somewhere else?
Andrew
prev parent reply other threads:[~2022-05-07 14:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 13:08 [PATCH net-next] net: use the %px format to display sock kerneljasonxing
2022-05-06 18:56 ` Peilin Ye
2022-05-07 1:26 ` Jason Xing
2022-05-07 14:22 ` Andrew Lunn [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=YnaAj1FoaBVnVzgt@lunn.ch \
--to=andrew@lunn.ch \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kerneljasonxing@gmail.com \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=songliubraving@fb.com \
--cc=xingwanli@kuaishou.com \
--cc=yepeilin.cs@gmail.com \
--cc=yhs@fb.com \
--cc=yoshfuji@linux-ipv6.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