]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cgroup: bpf: Add BPF_MAP_TYPE_CGROUP_ARRAY
authorMartin KaFai Lau <kafai@fb.com>
Thu, 30 Jun 2016 17:28:43 +0000 (10:28 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Jul 2016 20:30:38 +0000 (16:30 -0400)
commit4ed8ec521ed57c4e207ad464ca0388776de74d4b
treef656cf08ee272920b26cad8a91ae8d315242b5cd
parent1f3fe7ebf6136c341012db9f554d4caa566fcbaa
cgroup: bpf: Add BPF_MAP_TYPE_CGROUP_ARRAY

Add a BPF_MAP_TYPE_CGROUP_ARRAY and its bpf_map_ops's implementations.
To update an element, the caller is expected to obtain a cgroup2 backed
fd by open(cgroup2_dir) and then update the array with that fd.

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>
include/uapi/linux/bpf.h
kernel/bpf/arraymap.c
kernel/bpf/syscall.c
kernel/bpf/verifier.c