selftests/bpf: Ensure fentry prog cannot attach to bpf_spin_{lock,unlcok}()
authorYonghong Song <yonghong.song@linux.dev>
Wed, 7 Feb 2024 07:01:07 +0000 (23:01 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 13 Feb 2024 19:11:25 +0000 (11:11 -0800)
commitfc1c9e40da37905f87c73711a1ecc57f52c1fe1c
treeb952abe8f9f1f32783a44801d5e99973ee43b0a6
parent178c54666f9c4d2f49f2ea661d0c11b52f0ed190
selftests/bpf: Ensure fentry prog cannot attach to bpf_spin_{lock,unlcok}()

Add two tests to ensure fentry programs cannot attach to
bpf_spin_{lock,unlock}() helpers. The tracing_failure.c files
can be used in the future for other tracing failure cases.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20240207070107.335341-1-yonghong.song@linux.dev
tools/testing/selftests/bpf/prog_tests/tracing_failure.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/tracing_failure.c [new file with mode: 0644]