diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-10-17 02:40:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-18 16:17:10 +0300 |
commit | 00176a34d9e27ab1e77db75fe13abc005cffe0ca (patch) | |
tree | 5bc104a145c96a042214e6b7f3e860502cc2bd96 /kernel/bpf/syscall.c | |
parent | 7de16e3a35578f4f5accc6f5f23970310483d0a2 (diff) | |
download | linux-00176a34d9e27ab1e77db75fe13abc005cffe0ca.tar.xz |
bpf: remove the verifier ops from program structure
Since the verifier ops don't have to be associated with
the program for its entire lifetime we can move it to
verifier's struct bpf_verifier_env.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf/syscall.c')
-rw-r--r-- | kernel/bpf/syscall.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 444902b5a30d..0e893cac6795 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -748,22 +748,12 @@ static const struct bpf_prog_ops * const bpf_prog_types[] = { #undef BPF_MAP_TYPE }; -static const struct bpf_verifier_ops * const bpf_verifier_ops[] = { -#define BPF_PROG_TYPE(_id, _name) \ - [_id] = & _name ## _verifier_ops, -#define BPF_MAP_TYPE(_id, _ops) -#include <linux/bpf_types.h> -#undef BPF_PROG_TYPE -#undef BPF_MAP_TYPE -}; - static int find_prog_type(enum bpf_prog_type type, struct bpf_prog *prog) { if (type >= ARRAY_SIZE(bpf_prog_types) || !bpf_prog_types[type]) return -EINVAL; prog->aux->ops = bpf_prog_types[type]; - prog->aux->vops = bpf_verifier_ops[type]; prog->type = type; return 0; } |