diff options
author | Martin KaFai Lau <kafai@fb.com> | 2016-06-30 10:28:44 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-01 16:32:13 -0400 |
commit | 4a482f34afcc162d8456f449b137ec2a95be60d8 (patch) | |
tree | 0eb3ace759a7df82f868dc4d999fb65f120cabb2 /samples/kfifo/record-example.c | |
parent | 4ed8ec521ed57c4e207ad464ca0388776de74d4b (diff) | |
download | linux-4a482f34afcc162d8456f449b137ec2a95be60d8.tar.gz linux-4a482f34afcc162d8456f449b137ec2a95be60d8.tar.bz2 linux-4a482f34afcc162d8456f449b137ec2a95be60d8.zip |
cgroup: bpf: Add bpf_skb_in_cgroup_proto
Adds a bpf helper, bpf_skb_in_cgroup, to decide if a skb->sk
belongs to a descendant of a cgroup2. It is similar to the
feature added in netfilter:
commit c38c4597e4bf ("netfilter: implement xt_cgroup cgroup2 path match")
The user is expected to populate a BPF_MAP_TYPE_CGROUP_ARRAY
which will be used by the bpf_skb_in_cgroup.
Modifications to the bpf verifier is to ensure BPF_MAP_TYPE_CGROUP_ARRAY
and bpf_skb_in_cgroup() are always used together.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Cc: Alexei Starovoitov <ast@fb.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Tejun Heo <tj@kernel.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/kfifo/record-example.c')
0 files changed, 0 insertions, 0 deletions