On 16/02/26 4:41 pm, Hari Bathini wrote:


On 16/02/26 4:38 pm, Venkat wrote:
Hello Hari,

With this patch, tailcalls selftest is failing.

# ./test_progs -t tailcalls
tester_init:PASS:tester_log_buf 0 nsec
process_subtest:PASS:obj_open_mem 0 nsec
process_subtest:PASS:specs_alloc 0 nsec
#448/1   tailcalls/tailcall_1:OK
#448/2   tailcalls/tailcall_2:OK
test_tailcall_count:PASS:tailcall 0 nsec
test_tailcall_count:PASS:tailcall retval 0 nsec
test_tailcall_count:PASS:tailcall count 0 nsec
test_tailcall_count:FAIL:tailcall count unexpected tailcall count: actual 32 != expected 33
test_tailcall_count:PASS:tailcall 0 nsec
test_tailcall_count:PASS:tailcall retval 0 nsec
#448/3   tailcalls/tailcall_3:FAIL
#448/4   tailcalls/tailcall_4:OK
#448/5   tailcalls/tailcall_5:OK
#448/6   tailcalls/tailcall_6:OK
#448/7   tailcalls/tailcall_bpf2bpf_1:OK
#448/8   tailcalls/tailcall_bpf2bpf_2:OK
#448/9   tailcalls/tailcall_bpf2bpf_3:OK
#448/10  tailcalls/tailcall_bpf2bpf_4:OK
#448/11  tailcalls/tailcall_bpf2bpf_5:OK
#448/12  tailcalls/tailcall_bpf2bpf_6:OK
#448/13  tailcalls/tailcall_bpf2bpf_fentry:OK
#448/14  tailcalls/tailcall_bpf2bpf_fexit:OK
#448/15  tailcalls/tailcall_bpf2bpf_fentry_fexit:OK
#448/16  tailcalls/tailcall_bpf2bpf_fentry_entry:OK
#448/17  tailcalls/tailcall_poke:OK
#448/18  tailcalls/tailcall_bpf2bpf_hierarchy_1:OK
#448/19  tailcalls/tailcall_bpf2bpf_hierarchy_fentry:OK
#448/20  tailcalls/tailcall_bpf2bpf_hierarchy_fexit:OK
#448/21  tailcalls/tailcall_bpf2bpf_hierarchy_fentry_fexit:OK
#448/22  tailcalls/tailcall_bpf2bpf_hierarchy_fentry_entry:OK
#448/23  tailcalls/tailcall_bpf2bpf_hierarchy_2:OK
#448/24  tailcalls/tailcall_bpf2bpf_hierarchy_3:OK
#448/25  tailcalls/tailcall_freplace:OK
#448/26  tailcalls/tailcall_bpf2bpf_freplace:OK
#448/27  tailcalls/tailcall_failure:OK
#448/28  tailcalls/reject_tail_call_spin_lock:OK
#448/29  tailcalls/reject_tail_call_rcu_lock:OK
#448/30  tailcalls/reject_tail_call_preempt_lock:OK
#448/31  tailcalls/reject_tail_call_ref:OK
#448/32  tailcalls/tailcall_sleepable:OK
#448     tailcalls:FAIL

All error logs:
tester_init:PASS:tester_log_buf 0 nsec
process_subtest:PASS:obj_open_mem 0 nsec
process_subtest:PASS:specs_alloc 0 nsec
test_tailcall_count:PASS:tailcall 0 nsec
test_tailcall_count:PASS:tailcall retval 0 nsec
test_tailcall_count:PASS:tailcall count 0 nsec
test_tailcall_count:FAIL:tailcall count unexpected tailcall count: actual 32 != expected 33
test_tailcall_count:PASS:tailcall 0 nsec
test_tailcall_count:PASS:tailcall retval 0 nsec
#448/3   tailcalls/tailcall_3:FAIL
#448     tailcalls:FAIL
Summary: 0/31 PASSED, 0 SKIPPED, 1 FAILED

Regards,
Venkat.

On 16 Feb 2026, at 2:38 PM, Hari Bathini <[email protected]> wrote:

Test whether tail call count is incorrectly accounted for, when the
tail call fails due to a missing BPF program.

Signed-off-by: Hari Bathini <[email protected]>
---

- powerpc64 BPF JIT has been incorrectly accounting for tailcall count
  even when BPF program to tailcall into is missing. A simple change
  to one of the tailcall selftests could have flagged it earlier.


https://lore.kernel.org/all/[email protected]/


Above patch was not applied, during the test.


Hi Venkat,

Can you confirm if the above kernel patch was used or not?


Its with only below patch. Please refer git log.


git log
commit cb50b08d0c45e7f97e1364075a5ee399c63422d5 (HEAD -> master)
Author: Hari Bathini <[email protected]>
Date:   Mon Feb 16 14:38:02 2026 +0530

    selftests/bpf: test accounting of tail calls when prog is NULL

    Test whether tail call count is incorrectly accounted for, when the
    tail call fails due to a missing BPF program.

    Signed-off-by: Hari Bathini <[email protected]>

commit 0f2acd3148e0ef42bdacbd477f90e8533f96b2ac (origin/master, origin/HEAD)
Merge: 26a4cfaff82a a16ac6ca46d6
Author: Linus Torvalds <[email protected]>
Date:   Sun Feb 15 19:45:00 2026 -0800


Regards,

Venkat.


- Hari


Reply via email to