aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/bpf/verifier.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index a0454cb299ba..73cc136915fe 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -1009,10 +1009,6 @@ static int check_subprogs(struct bpf_verifier_env *env)
1009 verbose(env, "function calls to other bpf functions are allowed for root only\n"); 1009 verbose(env, "function calls to other bpf functions are allowed for root only\n");
1010 return -EPERM; 1010 return -EPERM;
1011 } 1011 }
1012 if (bpf_prog_is_dev_bound(env->prog->aux)) {
1013 verbose(env, "function calls in offloaded programs are not supported yet\n");
1014 return -EINVAL;
1015 }
1016 ret = add_subprog(env, i + insn[i].imm + 1); 1012 ret = add_subprog(env, i + insn[i].imm + 1);
1017 if (ret < 0) 1013 if (ret < 0)
1018 return ret; 1014 return ret;
@@ -5968,10 +5964,10 @@ static int fixup_call_args(struct bpf_verifier_env *env)
5968 struct bpf_insn *insn = prog->insnsi; 5964 struct bpf_insn *insn = prog->insnsi;
5969 int i, depth; 5965 int i, depth;
5970#endif 5966#endif
5971 int err; 5967 int err = 0;
5972 5968
5973 err = 0; 5969 if (env->prog->jit_requested &&
5974 if (env->prog->jit_requested) { 5970 !bpf_prog_is_dev_bound(env->prog->aux)) {
5975 err = jit_subprogs(env); 5971 err = jit_subprogs(env);
5976 if (err == 0) 5972 if (err == 0)
5977 return 0; 5973 return 0;