aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/bpf/progs/test_module_attach.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2022-04-28 11:53:49 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2022-04-28 23:46:04 +0200
commit32c03c4954a03d46f603f94acac9d2705bd5c9c6 (patch)
tree749d2f957655dcb434d8b2b502b95d18052258da /tools/testing/selftests/bpf/progs/test_module_attach.c
parentlibbpf: Support target-less SEC() definitions for BTF-backed programs (diff)
downloadwireguard-linux-32c03c4954a03d46f603f94acac9d2705bd5c9c6.tar.xz
wireguard-linux-32c03c4954a03d46f603f94acac9d2705bd5c9c6.zip
selftests/bpf: Use target-less SEC() definitions in various tests
Add new or modify existing SEC() definitions to be target-less and validate that libbpf handles such program definitions correctly. For kprobe/kretprobe we also add explicit test that generic bpf_program__attach() works in cases when kprobe definition contains proper target. It wasn't previously tested as selftests code always explicitly specified the target regardless. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Song Liu <songliubraving@fb.com> Link: https://lore.kernel.org/bpf/20220428185349.3799599-4-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_module_attach.c')
-rw-r--r--tools/testing/selftests/bpf/progs/test_module_attach.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_module_attach.c b/tools/testing/selftests/bpf/progs/test_module_attach.c
index 50ce16d02da7..08628afedb77 100644
--- a/tools/testing/selftests/bpf/progs/test_module_attach.c
+++ b/tools/testing/selftests/bpf/progs/test_module_attach.c
@@ -64,7 +64,7 @@ int BPF_PROG(handle_fentry,
__u32 fentry_manual_read_sz = 0;
-SEC("fentry/placeholder")
+SEC("fentry")
int BPF_PROG(handle_fentry_manual,
struct file *file, struct kobject *kobj,
struct bin_attribute *bin_attr, char *buf, loff_t off, size_t len)