diff options
| author | Alexei Starovoitov <[email protected]> | 2025-07-29 02:39:30 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2025-07-29 02:39:30 +0000 |
| commit | cd7c97f4584a93578f87ea6ff427f74e9a943cdf (patch) | |
| tree | 47dd71d20b993a7366bc34fc316713f31befe646 /tools/testing/selftests/bpf/progs/tracing_failure.c | |
| parent | bpf: Fix various typos in verifier.c comments (diff) | |
| parent | selftests/bpf: Migrate fexit_noreturns case into tracing_failure test suite (diff) | |
| download | kernel-cd7c97f4584a93578f87ea6ff427f74e9a943cdf.tar.gz kernel-cd7c97f4584a93578f87ea6ff427f74e9a943cdf.zip | |
Merge branch 'bpf-show-precise-rejected-function-when-attaching-to-__noreturn-and-deny-list-functions'
KaFai Wan says:
====================
bpf: Show precise rejected function when attaching to __noreturn and deny list functions
Show precise rejected function when attaching fexit/fmod_ret to __noreturn
functions.
Add log for attaching tracing programs to functions in deny list.
Add selftest for attaching tracing programs to functions in deny list.
Migrate fexit_noreturns case into tracing_failure test suite.
changes:
v4:
- change tracing_deny case attaching function (Yonghong Song)
- add Acked-by: Yafang Shao and Yonghong Song
v3:
- add tracing_deny case into existing files (Alexei)
- migrate fexit_noreturns into tracing_failure
- change SOB
https://lore.kernel.org/bpf/[email protected]/
v2:
- change verifier log message (Alexei)
- add missing Suggested-by
https://lore.kernel.org/bpf/[email protected]/
v1:
https://lore.kernel.org/all/[email protected]/
---
====================
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/tracing_failure.c')
| -rw-r--r-- | tools/testing/selftests/bpf/progs/tracing_failure.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/tracing_failure.c b/tools/testing/selftests/bpf/progs/tracing_failure.c index d41665d2ec8c..65e485c4468c 100644 --- a/tools/testing/selftests/bpf/progs/tracing_failure.c +++ b/tools/testing/selftests/bpf/progs/tracing_failure.c @@ -18,3 +18,15 @@ int BPF_PROG(test_spin_unlock, struct bpf_spin_lock *lock) { return 0; } + +SEC("?fentry/__rcu_read_lock") +int BPF_PROG(tracing_deny) +{ + return 0; +} + +SEC("?fexit/do_exit") +int BPF_PROG(fexit_noreturns) +{ + return 0; +} |
