]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: add owner_prog_type and accounted mem to array map's fdinfo
authorDaniel Borkmann <daniel@iogearbox.net>
Sat, 26 Nov 2016 00:28:07 +0000 (01:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Nov 2016 01:38:47 +0000 (20:38 -0500)
commitbe7261b370b39851f4186a5b2c3d63ccd70ffcb4
tree7effd3820f4219954547068dba423d212457d42f
parente599d3dabe7ff4b6266610de07fcc64a4019a459
bpf: add owner_prog_type and accounted mem to array map's fdinfo

Allow for checking the owner_prog_type of a program array map. In some
cases bpf(2) can return -EINVAL /after/ the verifier passed and did all
the rewrites of the bpf program.

The reason that lets us fail at this late stage is that program array
maps are incompatible. Allow users to inspect this earlier after they
got the map fd through BPF_OBJ_GET command. tc will get support for this.

Also, display how much we charged the map with regards to RLIMIT_MEMLOCK.

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