All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul@parallels.com>
To: Linux Netdev List <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Eric Dumazet <eric.dumazet@gmail.com>
Subject: [PATCH 0/2] unix: Introduce /proc/net/unix_peers file
Date: Thu, 01 Dec 2011 21:41:11 +0400	[thread overview]
Message-ID: <4ED7BC37.2030805@parallels.com> (raw)

Hi.

There's a common problem with unix sockets -- there's no way to determine
which tasks are connected to each other with a unix socket. Although the
/proc/<pid>/fd/<n> symlink shows a socket inode number, the peers do not
share an inode and thus these numbers give no answer.

There have been an attempt last year to print the peer=<number> for unbound
sockets in the existing /proc/net/unix file, but it was left unfinished and
had problems with bound sockets - for those the peer inode was still unknown
and the name didn't help at all.

I'd like to have this ability (determining the unix connection endpoints)
implemented and propose to introduce a /proc/net/unix_peers file with socket
inode number pairs. For not connected sockets 0 is printed.

Are there strong objections against this approach?

Patches apply to net-next tree.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>

             reply	other threads:[~2011-12-01 17:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-01 17:41 Pavel Emelyanov [this message]
2011-12-01 17:41 ` [PATCH 1/2] unix: Reformat proc files creation Pavel Emelyanov
2011-12-01 17:42 ` [PATCH 2/2] unix: Add /proc/net/unix_peers file Pavel Emelyanov
2011-12-04 18:25   ` David Miller
2011-12-05 10:25     ` Pavel Emelyanov
2011-12-05 23:47       ` David Miller

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=4ED7BC37.2030805@parallels.com \
    --to=xemul@parallels.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.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 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.