]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
bpf: export helper function flags and reject invalid ones
authorDaniel Borkmann <daniel@iogearbox.net>
Mon, 11 Jan 2016 00:16:38 +0000 (01:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Jan 2016 22:32:55 +0000 (17:32 -0500)
commit781c53bc5d5628065a46c70f02f5a0450f5842f4
tree26dcdcd139f1060baf37f933d4bbf90247004d0b
parentc8086f6d88f02aa8c87a71dca75fe5392d7679f7
bpf: export helper function flags and reject invalid ones

Export flags used by eBPF helper functions through UAPI, so they can be
used by programs (instead of them redefining all flags each time or just
using the hard-coded values). It also gives a better overview what flags
are used where and we can further get rid of the extra macros defined in
filter.c. Moreover, reject invalid flags.

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