linux-stable/net
Dmitry Yakunin 6e3a401fc8 inet_diag: add cgroup id attribute
This patch adds cgroup v2 ID to common inet diag message attributes.
Cgroup v2 ID is kernfs ID (ino or ino+gen). This attribute allows filter
inet diag output by cgroup ID obtained by name_to_handle_at() syscall.
When net_cls or net_prio cgroup is activated this ID is equal to 1 (root
cgroup ID) for newly created sockets.

Some notes about this ID:

1) gets initialized in socket() syscall
2) incoming socket gets ID from listening socket
   (not during accept() syscall)
3) not changed when process get moved to another cgroup
4) can point to deleted cgroup (refcounting)

v2:
  - use CONFIG_SOCK_CGROUP_DATA instead if CONFIG_CGROUPS

v3:
  - fix attr size by using nla_total_size_64bit() (Eric Dumazet)
  - more detailed commit message (Konstantin Khlebnikov)

Signed-off-by: Dmitry Yakunin <zeil@yandex-team.ru>
Reviewed-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Acked-By: Tejun Heo <tj@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-30 12:54:01 -07:00
..
6lowpan
9p
802
8021q
appletalk
atm docs: networking: convert atm.txt to ReST 2020-04-28 14:38:38 -07:00
ax25 docs: networking: convert ax25.txt to ReST 2020-04-28 14:38:38 -07:00
batman-adv batman-adv: remove unused inline function batadv_arp_change_timeout 2020-04-24 15:22:41 +02:00
bluetooth Bluetooth: Enhanced Connection Complete event belongs to LL Privacy 2020-04-16 12:43:03 +03:00
bpf
bpfilter SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00
bridge net: bridge: Add checks for enabling the STP. 2020-04-27 11:40:25 -07:00
caif net: caif: Fix use correct return type for ndo_start_xmit() 2020-04-30 12:13:07 -07:00
can
ceph docs: networking: convert dns_resolver.txt to ReST 2020-04-28 14:39:46 -07:00
core netpoll: Fix use correct return type for ndo_start_xmit() 2020-04-29 11:47:16 -07:00
dcb
dccp dccp: remove unused inline function dccp_set_seqno 2020-04-25 20:42:57 -07:00
decnet docs: networking: convert decnet.txt to ReST 2020-04-28 14:39:45 -07:00
dns_resolver docs: networking: convert dns_resolver.txt to ReST 2020-04-28 14:39:46 -07:00
dsa Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-04-25 20:18:53 -07:00
ethernet
ethtool drivers: Remove inclusion of vermagic header 2020-04-21 13:27:37 -07:00
hsr net: hsr: remove unused inline functions 2020-04-29 12:00:35 -07:00
ieee802154
ife
ipv4 inet_diag: add cgroup id attribute 2020-04-30 12:54:01 -07:00
ipv6 ila: remove unused inline function ila_addr_is_ila 2020-04-29 12:01:31 -07:00
iucv
kcm
key
l2tp l2tp: Allow management of tunnels and session in user namespace 2020-04-08 14:30:46 -07:00
l3mdev
lapb
llc
mac80211 mac80211: sta_info: Add lockdep condition for RCU list usage 2020-04-24 11:31:20 +02:00
mac802154
mpls
mptcp tcp: mptcp: use mptcp receive buffer space to select rcv window 2020-04-25 20:37:52 -07:00
ncsi
netfilter netfilter: nft_nat: add netmap support 2020-04-28 00:53:54 +02:00
netlabel netlabel: Kconfig: Update reference for NetLabel Tools project 2020-04-22 19:55:01 -07:00
netlink
netrom net: netrom: Fix potential nr_neigh refcnt leak in nr_add_node 2020-04-18 13:09:46 -07:00
nfc
nsh
openvswitch net: openvswitch: use div_u64() for 64-by-32 divisions 2020-04-25 20:48:21 -07:00
packet
phonet
psample
qrtr net: qrtr: Add tracepoint support 2020-04-22 12:55:54 -07:00
rds net/rds: Use ERR_PTR for rds_message_alloc_sgs() 2020-04-15 12:33:29 -07:00
rfkill
rose
rxrpc rxrpc: Fix DATA Tx to disable nofrag for UDP on AF_INET6 socket 2020-04-14 16:26:47 -07:00
sched Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-04-25 20:18:53 -07:00
sctp sctp: Fix SHUTDOWN CTSN Ack in the peer restart case 2020-04-22 19:27:40 -07:00
smc net/smc: remove obsolete link state DELETING 2020-04-30 12:44:34 -07:00
strparser
sunrpc svcrdma: Fix leak of svc_rdma_recv_ctxt objects 2020-04-17 12:40:38 -04:00
switchdev
tipc tipc: Fix potential tipc_node refcnt leak in tipc_rcv 2020-04-18 13:24:20 -07:00
tls net/tls: fix const assignment warning 2020-04-08 14:34:02 -07:00
unix
vmw_vsock
wimax
wireless nl80211: fix NL80211_ATTR_FTM_RESPONDER policy 2020-04-14 12:28:48 +02:00
x25 net/x25: Fix x25_neigh refcnt leak when receiving frame 2020-04-23 15:39:39 -07:00
xdp xsk: Add missing check on user supplied headroom size 2020-04-15 13:07:18 +02:00
xfrm
compat.c
Kconfig docs: networking: convert ip-sysctl.txt to ReST 2020-04-28 14:40:18 -07:00
Makefile
socket.c
sysctl_net.c