BPF List
 help / color / mirror / Atom feed
* [PATCH bpf] bpf: clarify a misleading verifier error message
@ 2025-03-18  8:35 Andrea Terzolo
  2025-03-18  8:43 ` Shung-Hsi Yu
  2025-03-19  2:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Andrea Terzolo @ 2025-03-18  8:35 UTC (permalink / raw)
  To: bpf
  Cc: Andrea Terzolo, Alexei Starovoitov, Daniel Borkmann,
	John Fastabend, Andrii Nakryiko, Martin KaFai Lau,
	Eduard Zingerman, Song Liu, Yonghong Song, KP Singh,
	Stanislav Fomichev, Hao Luo, Jiri Olsa, Shung-Hsi Yu

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>
---
 kernel/bpf/verifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 3303a3605..2e94fe5ea 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 not supported\n");
 			return -EINVAL;
 		}
 		break;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf] bpf: clarify a misleading verifier error message
  2025-03-18  8:35 [PATCH bpf] bpf: clarify a misleading verifier error message Andrea Terzolo
@ 2025-03-18  8:43 ` Shung-Hsi Yu
  2025-03-19  2:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Shung-Hsi Yu @ 2025-03-18  8:43 UTC (permalink / raw)
  To: Andrea Terzolo
  Cc: bpf, Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
	Yonghong Song, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa

On Tue, Mar 18, 2025 at 09:35:45AM +0100, Andrea Terzolo wrote:
> 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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf] bpf: clarify a misleading verifier error message
  2025-03-18  8:35 [PATCH bpf] bpf: clarify a misleading verifier error message Andrea Terzolo
  2025-03-18  8:43 ` Shung-Hsi Yu
@ 2025-03-19  2:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-03-19  2:20 UTC (permalink / raw)
  To: Andrea Terzolo
  Cc: bpf, ast, daniel, john.fastabend, andrii, martin.lau, eddyz87,
	song, yonghong.song, kpsingh, sdf, haoluo, jolsa, shung-hsi.yu

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Tue, 18 Mar 2025 09:35:45 +0100 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [bpf] bpf: clarify a misleading verifier error message
    https://git.kernel.org/bpf/bpf-next/c/a2598045ead9

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-19  2:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-18  8:35 [PATCH bpf] bpf: clarify a misleading verifier error message Andrea Terzolo
2025-03-18  8:43 ` Shung-Hsi Yu
2025-03-19  2:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox