]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: add missing map_flags to bpf_map_show_fdinfo
authorDaniel Borkmann <daniel@iogearbox.net>
Thu, 24 Mar 2016 23:30:25 +0000 (00:30 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Mar 2016 15:36:41 +0000 (11:36 -0400)
commit54f7d674a43b6574ea2e25165db037abb24c0f94
tree706f3bcffd78159e7cf735074ed7aacb0dfde437
parentf573e3b7e68509a9f503adca60c200eef00910ba
bpf: add missing map_flags to bpf_map_show_fdinfo

Add map_flags attribute to bpf_map_show_fdinfo(), so that tools like
tc can check for them when loading objects from a pinned entry, e.g.
if user intent wrt allocation (BPF_F_NO_PREALLOC) is different to the
pinned object, it can bail out. Follow-up to 3e35e8593c2f ("bpf:
pre-allocate hash map elements"), so that tc can still support this
with v4.6.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/syscall.c