diff mbox series

[v1,1/2] perf bench uprobe: Remove lib64 from libc.so.6 binary path

Message ID 20240406040911.1603801-1-irogers@google.com (mailing list archive)
State Not Applicable
Headers show
Series [v1,1/2] perf bench uprobe: Remove lib64 from libc.so.6 binary path | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Ian Rogers April 6, 2024, 4:09 a.m. UTC
bpf_program__attach_uprobe_opts will search LD_LIBRARY_PATH and so
specifying `/lib64` is unnecessary and causes failures for libc.so.6
paths like `/lib/x86_64-linux-gnu/libc.so.6`.

Fixes: 7b47623b8cae ("perf bench uprobe trace_printk: Add entry attaching an BPF program that does a trace_printk")
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/bench/uprobe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jiri Olsa April 10, 2024, 7:18 a.m. UTC | #1
On Fri, Apr 05, 2024 at 09:09:10PM -0700, Ian Rogers wrote:
> bpf_program__attach_uprobe_opts will search LD_LIBRARY_PATH and so
> specifying `/lib64` is unnecessary and causes failures for libc.so.6
> paths like `/lib/x86_64-linux-gnu/libc.so.6`.
> 
> Fixes: 7b47623b8cae ("perf bench uprobe trace_printk: Add entry attaching an BPF program that does a trace_printk")
> Signed-off-by: Ian Rogers <irogers@google.com>

patchset lgtm

Acked-by: Jiri Olsa <jolsa@kernel.org>

jirka

> ---
>  tools/perf/bench/uprobe.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/bench/uprobe.c b/tools/perf/bench/uprobe.c
> index 5c71fdc419dd..b722ff88fe7d 100644
> --- a/tools/perf/bench/uprobe.c
> +++ b/tools/perf/bench/uprobe.c
> @@ -47,7 +47,7 @@ static const char * const bench_uprobe_usage[] = {
>  #define bench_uprobe__attach_uprobe(prog) \
>  	skel->links.prog = bpf_program__attach_uprobe_opts(/*prog=*/skel->progs.prog, \
>  							   /*pid=*/-1, \
> -							   /*binary_path=*/"/lib64/libc.so.6", \
> +							   /*binary_path=*/"libc.so.6", \
>  							   /*func_offset=*/0, \
>  							   /*opts=*/&uprobe_opts); \
>  	if (!skel->links.prog) { \
> -- 
> 2.44.0.478.gd926399ef9-goog
>
Arnaldo Carvalho de Melo April 12, 2024, 8:52 p.m. UTC | #2
On Wed, Apr 10, 2024 at 09:18:44AM +0200, Jiri Olsa wrote:
> On Fri, Apr 05, 2024 at 09:09:10PM -0700, Ian Rogers wrote:
> > bpf_program__attach_uprobe_opts will search LD_LIBRARY_PATH and so
> > specifying `/lib64` is unnecessary and causes failures for libc.so.6
> > paths like `/lib/x86_64-linux-gnu/libc.so.6`.
> > 
> > Fixes: 7b47623b8cae ("perf bench uprobe trace_printk: Add entry attaching an BPF program that does a trace_printk")
> > Signed-off-by: Ian Rogers <irogers@google.com>
> 
> patchset lgtm
> 
> Acked-by: Jiri Olsa <jolsa@kernel.org>

Thanks, applied it to the series, b4 picked it just for this patch.

I tried to convince Konstantin to look for "patchset lgtm", "for the
series", but for now we need to do it manually :-)

- Arnaldo
diff mbox series

Patch

diff --git a/tools/perf/bench/uprobe.c b/tools/perf/bench/uprobe.c
index 5c71fdc419dd..b722ff88fe7d 100644
--- a/tools/perf/bench/uprobe.c
+++ b/tools/perf/bench/uprobe.c
@@ -47,7 +47,7 @@  static const char * const bench_uprobe_usage[] = {
 #define bench_uprobe__attach_uprobe(prog) \
 	skel->links.prog = bpf_program__attach_uprobe_opts(/*prog=*/skel->progs.prog, \
 							   /*pid=*/-1, \
-							   /*binary_path=*/"/lib64/libc.so.6", \
+							   /*binary_path=*/"libc.so.6", \
 							   /*func_offset=*/0, \
 							   /*opts=*/&uprobe_opts); \
 	if (!skel->links.prog) { \