-
- Downloads
bpf: introduce cgroup storage maps
This commit introduces BPF_MAP_TYPE_CGROUP_STORAGE maps: a special type of maps which are implementing the cgroup storage. >From the userspace point of view it's almost a generic hash map with the (cgroup inode id, attachment type) pair used as a key. The only difference is that some operations are restricted: 1) a user can't create new entries, 2) a user can't remove existing entries. The lookup from userspace is o(log(n)). Signed-off-by:Roman Gushchin <guro@fb.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Acked-by:
Martin KaFai Lau <kafai@fb.com> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net>
Showing
- include/linux/bpf-cgroup.h 38 additions, 0 deletionsinclude/linux/bpf-cgroup.h
- include/linux/bpf.h 1 addition, 0 deletionsinclude/linux/bpf.h
- include/linux/bpf_types.h 3 additions, 0 deletionsinclude/linux/bpf_types.h
- include/uapi/linux/bpf.h 6 additions, 0 deletionsinclude/uapi/linux/bpf.h
- kernel/bpf/Makefile 1 addition, 0 deletionskernel/bpf/Makefile
- kernel/bpf/local_storage.c 376 additions, 0 deletionskernel/bpf/local_storage.c
- kernel/bpf/syscall.c 3 additions, 0 deletionskernel/bpf/syscall.c
- kernel/bpf/verifier.c 12 additions, 0 deletionskernel/bpf/verifier.c
Loading
Please register or sign in to comment