summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2018-06-03 00:06:36 +0300
committerAlexei Starovoitov <ast@kernel.org>2018-06-03 17:46:54 +0300
commitcb20b08ead401fd17627a36f035c0bf5bfee5567 (patch)
treec54c33ebf505b934a4f0f4dd6502da47245c6364 /ipc
parent09772d92cd5ad998b0d5f6f46cd1658f8cb698cf (diff)
downloadlinux-cb20b08ead401fd17627a36f035c0bf5bfee5567.tar.xz
bpf: add bpf_skb_cgroup_id helper
Add a new bpf_skb_cgroup_id() helper that allows to retrieve the cgroup id from the skb's socket. This is useful in particular to enable bpf_get_cgroup_classid()-like behavior for cgroup v1 in cgroup v2 by allowing ID based matching on egress. This can in particular be used in combination with applying policy e.g. from map lookups, and also complements the older bpf_skb_under_cgroup() interface. In user space the cgroup id for a given path can be retrieved through the f_handle as demonstrated in [0] recently. [0] https://lkml.org/lkml/2018/5/22/1190 Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions