summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/tailcall_callback.c
AgeCommit message (Collapse)Author
6 daysselftests/bpf: Test direct tail calls from callbacksKumar Kartikeya Dwivedi
tailcall_callback tests a tail call one static subprogram below a callback. That reaches the later stack-depth rejection, but it does not exercise the tail-call helper while the current frame is itself a callback. Add a callback that calls bpf_tail_call directly and expect the existing "cannot tail call within callback" diagnostic. On an affected kernel, the load instead reaches the "callback unexpected regs" verifier bug, so the expected message is absent and the test fails. The existing ordinary subprogram case remains a success control for legitimate tail calls. Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20260903144433.1716731-5-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2026-07-16selftests/bpf: Add testcases for callback with tailcallPu Lehui
Add 2 testcases for callback with tailcall: 1. failure case: callback->subprog->tailcall. 2. success case: subprog with tailcall do not affect no-tailcall callback. Signed-off-by: Pu Lehui <pulehui@huawei.com> Link: https://patch.msgid.link/20260716120157.835937-4-pulehui@huaweicloud.com Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>