summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Terzolo <andreaterzolo3@gmail.com>2025-03-18 11:35:45 +0300
committerAlexei Starovoitov <ast@kernel.org>2025-03-19 05:11:23 +0300
commita2598045ead99b51b00e81d46560757b9a95bd84 (patch)
tree0eb3c99ebc1137f3233d7284075ca13fb1bf5368
parent6ca21620b475e9d359c80a5db9ede7ce4abc4d03 (diff)
downloadlinux-a2598045ead99b51b00e81d46560757b9a95bd84.tar.xz
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 <shung-hsi.yu@suse.com> Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com> Acked-by: Shung-Hsi Yu <shung-hsi.yu@suse.com> Link: https://lore.kernel.org/r/20250318083551.8192-1-andreaterzolo3@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-rw-r--r--kernel/bpf/verifier.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 19ece8893d38..9f8cbd5c61bc 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -9887,7 +9887,7 @@ static int check_map_func_compatibility(struct bpf_verifier_env *env,
if (map->map_type != BPF_MAP_TYPE_PROG_ARRAY)
goto error;
if (env->subprog_cnt > 1 && !allow_tail_call_in_subprogs(env)) {
- verbose(env, "tail_calls are not allowed in non-JITed programs with bpf-to-bpf calls\n");
+ verbose(env, "mixing of tail_calls and bpf-to-bpf calls is not supported\n");
return -EINVAL;
}
break;