• R
    bpf: introduce cgroup storage maps · de9cbbaa
    Roman Gushchin 提交于
    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: NRoman Gushchin <guro@fb.com>
    Cc: Alexei Starovoitov <ast@kernel.org>
    Cc: Daniel Borkmann <daniel@iogearbox.net>
    Acked-by: NMartin KaFai Lau <kafai@fb.com>
    Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
    de9cbbaa
bpf.h 23.8 KB