summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_helper_restricted.c
diff options
context:
space:
mode:
authorJoanne Koong <joannelkoong@gmail.com>2022-08-05 10:14:05 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2022-08-08 15:42:00 +0200
commit5653f55ebd767b4ef47414ee7f852517993eda6f (patch)
tree0a66fd3be39b534efd50081de4f1b312823410f0 /tools/testing/selftests/bpf/progs/test_helper_restricted.c
parentd25f40ff68aa61c838947bb9adee6c6b36e77453 (diff)
selftests/bpf: Clean up sys_nanosleep uses
This patch cleans up a few things: * dynptr_fail.c: There is no sys_nanosleep tracepoint. dynptr_fail only tests that the prog load fails, so just SEC("?raw_tp") suffices here. * test_bpf_cookie: There is no sys_nanosleep kprobe. The prog is loaded in userspace through bpf_program__attach_kprobe_opts passing in SYS_NANOSLEEP_KPROBE_NAME, so just SEC("k{ret}probe") suffices here. * test_helper_restricted: There is no sys_nanosleep kprobe. test_helper_restricted only tests that the prog load fails, so just SEC("?kprobe")( suffices here. There are no functional changes. Suggested-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Joanne Koong <joannelkoong@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20220805171405.2272103-1-joannelkoong@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_helper_restricted.c')
-rw-r--r--tools/testing/selftests/bpf/progs/test_helper_restricted.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_helper_restricted.c b/tools/testing/selftests/bpf/progs/test_helper_restricted.c
index 20ef9d433b97..5715c569ec03 100644
--- a/tools/testing/selftests/bpf/progs/test_helper_restricted.c
+++ b/tools/testing/selftests/bpf/progs/test_helper_restricted.c
@@ -72,7 +72,7 @@ int tp_timer(void *ctx)
return 0;
}
-SEC("?kprobe/sys_nanosleep")
+SEC("?kprobe")
int kprobe_timer(void *ctx)
{
timer_work();
@@ -104,7 +104,7 @@ int tp_spin_lock(void *ctx)
return 0;
}
-SEC("?kprobe/sys_nanosleep")
+SEC("?kprobe")
int kprobe_spin_lock(void *ctx)
{
spin_lock_work();