mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] libbpf: fix multi-uprobe attach not working with dynamic symbols
@ 2025-03-27 10:07 Mateusz Bieganski
  2025-03-28 18:14 ` Andrii Nakryiko
  0 siblings, 1 reply; 3+ messages in thread
From: Mateusz Bieganski @ 2025-03-27 10:07 UTC (permalink / raw)
  Cc: bieganski.gm, Andrii Nakryiko, Eduard Zingerman,
	Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, open list:BPF [LIBRARY] (libbpf),
	open list

ENOENT is incorrectly propagated to caller, if requested symbol is
present in dynamic linker symbol table and not present in symbol table.

Signed-off-by: Mateusz Bieganski <bieganski.gm@gmail.com>
---
 tools/lib/bpf/elf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/lib/bpf/elf.c b/tools/lib/bpf/elf.c
index 823f83ad819c..41839ef5bc97 100644
--- a/tools/lib/bpf/elf.c
+++ b/tools/lib/bpf/elf.c
@@ -439,8 +439,10 @@ int elf_resolve_syms_offsets(const char *binary_path, int cnt,
 		struct elf_sym *sym;
 
 		err = elf_sym_iter_new(&iter, elf_fd.elf, binary_path, sh_types[i], st_type);
-		if (err == -ENOENT)
+		if (err == -ENOENT) {
+			err = 0;
 			continue;
+		}
 		if (err)
 			goto out;
 
-- 
2.39.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-03  9:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-27 10:07 [PATCH] libbpf: fix multi-uprobe attach not working with dynamic symbols Mateusz Bieganski
2025-03-28 18:14 ` Andrii Nakryiko
2025-04-03  9:45   ` Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®