Re: [PATCH] libbpf: Use the correct fd when attaching to perf events

2021-03-12 Thread Andrii Nakryiko
On Fri, Mar 12, 2021 at 6:43 PM Sultan Alsawaf wrote: > > On Fri, Mar 12, 2021 at 06:33:01PM -0800, Andrii Nakryiko wrote: > > On Fri, Mar 12, 2021 at 6:22 PM Sultan Alsawaf > > wrote: > > > > > > On Fri, Mar 12, 2021 at 05:31:14PM -0800, Andrii Nakryiko wrote: > > > > On Fri, Mar 12, 2021 at

Re: [PATCH] libbpf: Use the correct fd when attaching to perf events

2021-03-12 Thread Sultan Alsawaf
On Fri, Mar 12, 2021 at 06:33:01PM -0800, Andrii Nakryiko wrote: > On Fri, Mar 12, 2021 at 6:22 PM Sultan Alsawaf wrote: > > > > On Fri, Mar 12, 2021 at 05:31:14PM -0800, Andrii Nakryiko wrote: > > > On Fri, Mar 12, 2021 at 1:43 PM Sultan Alsawaf > > > wrote: > > > > > > > > From: Sultan

Re: [PATCH] libbpf: Use the correct fd when attaching to perf events

2021-03-12 Thread Andrii Nakryiko
On Fri, Mar 12, 2021 at 6:22 PM Sultan Alsawaf wrote: > > On Fri, Mar 12, 2021 at 05:31:14PM -0800, Andrii Nakryiko wrote: > > On Fri, Mar 12, 2021 at 1:43 PM Sultan Alsawaf > > wrote: > > > > > > From: Sultan Alsawaf > > > > > > We should be using the program fd here, not the perf event fd. >

Re: [PATCH] libbpf: Use the correct fd when attaching to perf events

2021-03-12 Thread Sultan Alsawaf
On Fri, Mar 12, 2021 at 05:31:14PM -0800, Andrii Nakryiko wrote: > On Fri, Mar 12, 2021 at 1:43 PM Sultan Alsawaf wrote: > > > > From: Sultan Alsawaf > > > > We should be using the program fd here, not the perf event fd. > > Why? Can you elaborate on what issue you ran into with the current

Re: [PATCH] libbpf: Use the correct fd when attaching to perf events

2021-03-12 Thread Andrii Nakryiko
On Fri, Mar 12, 2021 at 1:43 PM Sultan Alsawaf wrote: > > From: Sultan Alsawaf > > We should be using the program fd here, not the perf event fd. Why? Can you elaborate on what issue you ran into with the current code? > > Fixes: 63f2f5ee856ba ("libbpf: add ability to attach/detach BPF program

[PATCH] libbpf: Use the correct fd when attaching to perf events

2021-03-12 Thread Sultan Alsawaf
From: Sultan Alsawaf We should be using the program fd here, not the perf event fd. Fixes: 63f2f5ee856ba ("libbpf: add ability to attach/detach BPF program to perf event") Signed-off-by: Sultan Alsawaf --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff