]> git.baikalelectronics.ru Git - kernel.git/commit
Add a eBPF helper function to retrieve socket uid
authorChenbo Feng <fengc@google.com>
Thu, 23 Mar 2017 00:27:35 +0000 (17:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Mar 2017 00:01:02 +0000 (17:01 -0700)
commite06af7f4b8d4ed1ac3884ff2018e417ace605c3e
tree049fec629362ea0f3017381bc96f4e117ed3e903
parent7b4aeae491d99644fd4510ca19f8fb6db6f18a9a
Add a eBPF helper function to retrieve socket uid

Returns the owner uid of the socket inside a sk_buff. This is useful to
perform per-UID accounting of network traffic or per-UID packet
filtering. The socket need to be a fullsock otherwise overflowuid is
returned.

Signed-off-by: Chenbo Feng <fengc@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/bpf.h
net/core/filter.c
tools/include/uapi/linux/bpf.h