aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/bpf/syscall.c')
-rw-r--r--kernel/bpf/syscall.c10
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[] = {
748#undef BPF_MAP_TYPE 748#undef BPF_MAP_TYPE
749}; 749};
750 750
751static const struct bpf_verifier_ops * const bpf_verifier_ops[] = {
752#define BPF_PROG_TYPE(_id, _name) \
753 [_id] = & _name ## _verifier_ops,
754#define BPF_MAP_TYPE(_id, _ops)
755#include <linux/bpf_types.h>
756#undef BPF_PROG_TYPE
757#undef BPF_MAP_TYPE
758};
759
760static int find_prog_type(enum bpf_prog_type type, struct bpf_prog *prog) 751static int find_prog_type(enum bpf_prog_type type, struct bpf_prog *prog)
761{ 752{
762 if (type >= ARRAY_SIZE(bpf_prog_types) || !bpf_prog_types[type]) 753 if (type >= ARRAY_SIZE(bpf_prog_types) || !bpf_prog_types[type])
763 return -EINVAL; 754 return -EINVAL;
764 755
765 prog->aux->ops = bpf_prog_types[type]; 756 prog->aux->ops = bpf_prog_types[type];
766 prog->aux->vops = bpf_verifier_ops[type];
767 prog->type = type; 757 prog->type = type;
768 return 0; 758 return 0;
769} 759}