On Tue, Sep 28, 2021 at 2:54 AM Shuyi Cheng <chengshuyi@xxxxxxxxxxxxxxxxx> 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!