public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 1/4] bpf: Propagate error from visit_tailcall_insn
@ 2026-04-08 19:12 Daniel Borkmann
  2026-04-08 19:12 ` [PATCH bpf-next v2 2/4] bpf: Fix ld_{abs,ind} failure path analysis in subprogs Daniel Borkmann
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Daniel Borkmann @ 2026-04-08 19:12 UTC (permalink / raw)
  To: bpf; +Cc: ast, eddyz87, info

Commit e40f5a6bf88a ("bpf: correct stack liveness for tail calls") added
visit_tailcall_insn() but did not check its return value.

Fixes: e40f5a6bf88a ("bpf: correct stack liveness for tail calls")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
---
 kernel/bpf/verifier.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 594260c1f382..db009d509ade 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -19355,8 +19355,11 @@ static int visit_insn(int t, struct bpf_verifier_env *env)
 				mark_subprog_might_sleep(env, t);
 			if (bpf_helper_changes_pkt_data(insn->imm))
 				mark_subprog_changes_pkt_data(env, t);
-			if (insn->imm == BPF_FUNC_tail_call)
-				visit_tailcall_insn(env, t);
+			if (insn->imm == BPF_FUNC_tail_call) {
+				ret = visit_tailcall_insn(env, t);
+				if (ret)
+					return ret;
+			}
 		} else if (insn->src_reg == BPF_PSEUDO_KFUNC_CALL) {
 			struct bpf_kfunc_call_arg_meta meta;
 
-- 
2.43.0


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

end of thread, other threads:[~2026-04-09  1:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-08 19:12 [PATCH bpf-next v2 1/4] bpf: Propagate error from visit_tailcall_insn Daniel Borkmann
2026-04-08 19:12 ` [PATCH bpf-next v2 2/4] bpf: Fix ld_{abs,ind} failure path analysis in subprogs Daniel Borkmann
2026-04-08 19:12 ` [PATCH bpf-next v2 3/4] bpf: Remove static qualifier from local subprog pointer Daniel Borkmann
2026-04-08 19:12 ` [PATCH bpf-next v2 4/4] selftests/bpf: Add tests for ld_{abs,ind} failure path in subprogs Daniel Borkmann
2026-04-09  1:50 ` [PATCH bpf-next v2 1/4] bpf: Propagate error from visit_tailcall_insn 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