On Wed, Feb 04, 2026 at 11:05:09AM -0800, Andrii Nakryiko wrote:
> On Tue, Feb 3, 2026 at 1:39 AM Jiri Olsa <[email protected]> wrote:
> >
> > Adding new link to allow to attach program to multiple function
> > BTF IDs. The link is represented by struct bpf_tracing_multi_link.
> >
> > To configure the link, new fields are added to bpf_attr::link_create
> > to pass array of BTF IDs;
> >
> >   struct {
> >       __aligned_u64   btf_ids;        /* addresses to attach */
> >       __u32           btf_ids_cnt;    /* addresses count */
> 
> cookies suspiciously missing?

right, need to be added, no mystery there ;-)

we will just assign it to the bpf_tramp_node object for each trampoline/id

thanks,
jirka


> 
> >   } tracing_multi;
> >
> > Each BTF ID represents function (BTF_KIND_FUNC) that the link will
> > attach bpf program to.
> >
> > We use previously added bpf_trampoline_multi_attach/detach functions
> > to attach/detach the link.
> >
> > Signed-off-by: Jiri Olsa <[email protected]>
> > ---
> >  include/linux/trace_events.h   |   6 ++
> >  include/uapi/linux/bpf.h       |   5 ++
> >  kernel/bpf/syscall.c           |   2 +
> >  kernel/trace/bpf_trace.c       | 105 +++++++++++++++++++++++++++++++++
> >  tools/include/uapi/linux/bpf.h |   5 ++
> >  5 files changed, 123 insertions(+)
> >
> 
> [...]

Reply via email to