netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Pascal Bouchareine <kalou@tfz.net>, linux-kernel@vger.kernel.org
Cc: linux-api@vger.kernel.org, netdev@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH 2/2] net: socket: implement SO_DESCRIPTION
Date: Sun, 16 Aug 2020 11:15:41 -0700	[thread overview]
Message-ID: <7c910594-b297-646e-9410-f133fd62a902@gmail.com> (raw)
In-Reply-To: <20200815182344.7469-3-kalou@tfz.net>



On 8/15/20 11:23 AM, Pascal Bouchareine wrote:
> This command attaches the zero terminated string in optval to the
> socket for troubleshooting purposes. The free string is displayed in the
> process fdinfo file for that fd (/proc/<pid>/fdinfo/<fd>).
> 
> One intended usage is to allow processes to self-document sockets
> for netstat and friends to report
> 
> We ignore optlen and constrain the string to a static max size
> 
>

1) You also ignored what would happen at accept() time.

Please test your patches with ASAN.

2) Also, why is that description specific to sockets ?

3) When a new socket option is added, it is customary to implement both setsockopt() and getsockopt()
  for things like CRIU.


  parent reply	other threads:[~2020-08-16 18:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-15 18:23 [RFC PATCH 0/2] proc,socket: attach description to sockets Pascal Bouchareine
2020-08-15 18:23 ` [PATCH 1/2] mm: add GFP mask param to strndup_user Pascal Bouchareine
2020-08-15 22:42   ` Al Viro
2020-08-16 16:10     ` Alexey Dobriyan
2020-08-15 18:23 ` [PATCH 2/2] net: socket: implement SO_DESCRIPTION Pascal Bouchareine
2020-08-16  5:02   ` kernel test robot
2020-08-16  7:33   ` kernel test robot
2020-08-16  7:33   ` [RFC PATCH] net: socket: sock_set_description() can be static kernel test robot
2020-08-16  9:00   ` [PATCH 2/2] net: socket: implement SO_DESCRIPTION kernel test robot
2020-08-16 18:15   ` Eric Dumazet [this message]
2020-08-16 19:30     ` Pascal Bouchareine
2020-08-22  3:28 ` [PATCH v2 1/2] mm: add GFP mask param to strndup_user Pascal Bouchareine
2020-08-22  3:28   ` [PATCH v2 2/2] net: socket: implement SO_DESCRIPTION Pascal Bouchareine
2020-08-22  6:57     ` kernel test robot
2020-08-22 19:36     ` David Miller
2020-08-22 19:59       ` Pascal Bouchareine
2020-08-22 20:19         ` Pascal Bouchareine
2020-08-22 20:53           ` Pascal Bouchareine
2020-08-22 21:01             ` David Miller
2020-08-23 22:28               ` Pascal Bouchareine
2020-08-22  3:51   ` [PATCH v2 1/2] mm: add GFP mask param to strndup_user Andrew Morton
2020-08-22 19:36     ` Pascal Bouchareine

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=7c910594-b297-646e-9410-f133fd62a902@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=kalou@tfz.net \
    --cc=kuba@kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).