* How to attach a single bpf_program multiple times?
@ 2021-09-28 9:54 Shuyi Cheng
2021-10-01 20:52 ` Andrii Nakryiko
0 siblings, 1 reply; 2+ messages in thread
From: Shuyi Cheng @ 2021-09-28 9:54 UTC (permalink / raw)
To: bpf
Hi, everyone!
When the ebpf program is the same, but attach to a different kprobe
function, I have to recompile the entire program. If the kprobe function
of bpf_program attach can be specified dynamically, then there is no
need to modify the original program.
Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to attach a single bpf_program multiple times?
2021-09-28 9:54 How to attach a single bpf_program multiple times? Shuyi Cheng
@ 2021-10-01 20:52 ` Andrii Nakryiko
0 siblings, 0 replies; 2+ messages in thread
From: Andrii Nakryiko @ 2021-10-01 20:52 UTC (permalink / raw)
To: Shuyi Cheng; +Cc: bpf
On Tue, Sep 28, 2021 at 2:54 AM Shuyi Cheng
<chengshuyi@linux.alibaba.com> wrote:
>
> Hi, everyone!
>
> When the ebpf program is the same, but attach to a different kprobe
> function, I have to recompile the entire program. If the kprobe function
> of bpf_program attach can be specified dynamically, then there is no
> need to modify the original program.
With libbpf you can attach the same bpf_program to multiple kprobes.
Use bpf_program__attach_kprobe() API multiple times with the same
program instance, but different target functions.
>
> Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-01 20:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 9:54 How to attach a single bpf_program multiple times? Shuyi Cheng
2021-10-01 20:52 ` Andrii Nakryiko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.