Skip to content

Dumping AF_UNIX sockets via netlink

Pavel Emelyanov netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13sock_diag: Move the SOCK_DIAG_BY_FAMILY cmd declarationinclude/linux/inet_diag.h include/linux/sock_diag.h+3 -10 replies
2/13sock_diag: Fix module netlink aliasesnet/core/sock_diag.c net/dccp/diag.c net/ipv4/inet_diag.c +2 more+10 -90 replies
3/13sock_diag: Generalize requests cookies managementsinclude/linux/inet_diag.h include/linux/sock_diag.h net/core/sock_diag.c +2 more+27 -210 replies
4/13af_unix: Export stuff required for diag moduleinclude/net/af_unix.h net/unix/af_unix.c+9 -30 replies
5/13unix_diag: Basic module skeletoninclude/linux/unix_diag.h net/unix/diag.c+81 -00 replies
6/13unix_diag: Dumping all sockets corenet/unix/diag.c+75 -10 replies
7/13unix_diag: Dumping exact socket corenet/unix/diag.c+66 -10 replies
8/13unix_diag: Unix socket name NLAinclude/linux/unix_diag.h net/unix/diag.c+28 -00 replies
9/13unix_diag: Unix inode info NLAinclude/linux/unix_diag.h net/unix/diag.c+28 -00 replies
10/13unix_diag: Unix peer inode NLAinclude/linux/unix_diag.h net/unix/diag.c+26 -00 replies
11/13unix_diag: Pending connections IDs NLAinclude/linux/unix_diag.h net/unix/diag.c+41 -00 replies
12/13unix_diag: Receive queue lenght NLAinclude/linux/unix_diag.h net/unix/diag.c+15 -00 replies
13/13unix_diag: Write it into kbuildnet/unix/Kconfig net/unix/Makefile+10 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/13] Dumping AF_UNIX sockets via netlink

Make the unix_diag.ko module, which is the AF_UNIX client for the sock_diag.

Use the sock_i_ino() as the primary ID key for sockets. This is currently the only unique (except for the sk address itself) ID of a unix socket and is de facto used in the ss tool to identify sockets. Thus the basic nlk request and response structures operate on this ID. Other socket info (sun_name, peer, etc.) are reported in the respective NLA-s (patches 8 through 12).

There's a locking trickery in patch #11. I've tried to study it carefully and checked with lockdep, but anyway, please, pay special attention to it.

The patch for ss tool is also included.