aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/recursive_attach.c
Commit message (Collapse)AuthorAgeFilesLines
* selftests/bpf: Stress test attaching a BPF prog to another BPF progIlya Leoshkevich2025-07-171-0/+67
| | | | | | | | | | | Add a test that invokes a BPF prog in a loop, while concurrently attaching and detaching another BPF prog to and from it. This helps identifying race conditions in bpf_arch_text_poke(). Signed-off-by: Ilya Leoshkevich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
* selftests/bpf: Test re-attachment fix for bpf_tracing_prog_attachDmitrii Dolgov2024-01-051-0/+44
| | | | | | | | | | | | | | | | | Add a test case to verify the fix for "prog->aux->dst_trampoline and tgt_prog is NULL" branch in bpf_tracing_prog_attach. The sequence of events: 1. load rawtp program 2. load fentry program with rawtp as target_fd 3. create tracing link for fentry program with target_fd = 0 4. repeat 3 Acked-by: Jiri Olsa <[email protected]> Acked-by: Song Liu <[email protected]> Signed-off-by: Dmitrii Dolgov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
* selftests/bpf: Add test for recursive attachment of tracing progsDmitrii Dolgov2024-01-051-0/+107
Verify the fact that only one fentry prog could be attached to another fentry, building up an attachment chain of limited size. Use existing bpf_testmod as a start of the chain. Acked-by: Jiri Olsa <[email protected]> Acked-by: Song Liu <[email protected]> Signed-off-by: Dmitrii Dolgov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>