libbpf: Fix uretprobe.multi.s programs auto attachment
authorJiri Olsa <jolsa@kernel.org>
Tue, 10 Sep 2024 12:53:36 +0000 (14:53 +0200)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 10 Sep 2024 18:35:13 +0000 (11:35 -0700)
commit8c8b4759740359a6f2e7ffdf6531dea871130c63
tree05927811c0ec86e093f21a5bc1e5e0ad164fe5a8
parent41d0c4677feee1ea063e0f2c2af72dc953b1f1cc
libbpf: Fix uretprobe.multi.s programs auto attachment

As reported by Andrii we don't currently recognize uretprobe.multi.s
programs as return probes due to using (wrong) strcmp function.

Using str_has_pfx() instead to match uretprobe.multi prefix.

Tests are passing, because the return program was executed
as entry program and all counts were incremented properly.

Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20240910125336.3056271-1-jolsa@kernel.org
tools/lib/bpf/libbpf.c