bpf: Add map_name to bpf_map_info
This patch allows userspace to specify a name for a map during BPF_MAP_CREATE. The map's name can later be exported to user space via BPF_OBJ_GET_INFO_BY_FD. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Alexei Starovoitov <ast@fb.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
cb4d2b3f03
commit
ad5b177bd7
@@ -56,6 +56,7 @@ struct bpf_map {
|
||||
struct work_struct work;
|
||||
atomic_t usercnt;
|
||||
struct bpf_map *inner_map_meta;
|
||||
u8 name[BPF_OBJ_NAME_LEN];
|
||||
};
|
||||
|
||||
/* function argument constraints */
|
||||
|
Reference in New Issue
Block a user