Skip to content

Commit a259804

Browse files
Andreagit97Alexei Starovoitov
authored and
Alexei Starovoitov
committed
bpf: clarify a misleading verifier error message
The current verifier error message states that tail_calls are not allowed in non-JITed programs with BPF-to-BPF calls. While this is accurate, it is not the only scenario where this restriction applies. Some architectures do not support this feature combination even when programs are JITed. This update improves the error message to better reflect these limitations. Suggested-by: Shung-Hsi Yu <[email protected]> Signed-off-by: Andrea Terzolo <[email protected]> Acked-by: Shung-Hsi Yu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 6ca2162 commit a259804

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/bpf/verifier.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -9887,7 +9887,7 @@ static int check_map_func_compatibility(struct bpf_verifier_env *env,
98879887
if (map->map_type != BPF_MAP_TYPE_PROG_ARRAY)
98889888
goto error;
98899889
if (env->subprog_cnt > 1 && !allow_tail_call_in_subprogs(env)) {
9890-
verbose(env, "tail_calls are not allowed in non-JITed programs with bpf-to-bpf calls\n");
9890+
verbose(env, "mixing of tail_calls and bpf-to-bpf calls is not supported\n");
98919891
return -EINVAL;
98929892
}
98939893
break;

0 commit comments

Comments
 (0)