Subject: Re: [PATCH 5/5] bpf: Allow to resolve bpf trampoline in unwind

From: Jiri Olsa <[email-masked]>
Date: Tue, 4 Feb 2020 09:18:10 +0100

On Mon, Feb 03, 2020 at 09:27:39PM +0100, Björn Töpel wrote:
> On 2020-02-03 20:58, Jiri Olsa wrote:
> [...]
> > > > ...and FWIW, it would be nice with bpf_dispatcher_<...> entries in kallsyms
> > > 
> > > ok so it'd be 'bpf_dispatcher_<name>'
> > 
> > hi,
> > so the only dispatcher is currently defined as:
> >    DEFINE_BPF_DISPATCHER(bpf_dispatcher_xdp)
> > 
> > with the bpf_dispatcher_<name> logic it shows in kallsyms as:
> >    ffffffffa0450000 t bpf_dispatcher_bpf_dispatcher_xdp    [bpf]
> > 
> 
> Ick! :-P

yea, but it draws attention ;-)

> diff --git a/include/linux/filter.h b/include/linux/filter.h
> index f349e2c0884c..eafe72644282 100644
> --- a/include/linux/filter.h
> +++ b/include/linux/filter.h
> @@ -577,7 +577,7 @@ DECLARE_STATIC_KEY_FALSE(bpf_stats_enabled_key);
>  	ret; })
> 
>  #define BPF_PROG_RUN(prog, ctx) __BPF_PROG_RUN(prog, ctx,		\
> -					       bpf_dispatcher_nopfunc)
> +					       bpf_dispatcher_nop_func)
> 
>  #define BPF_SKB_CB_LEN QDISC_CB_PRIV_LEN
> 
> @@ -701,7 +701,7 @@ static inline u32 bpf_prog_run_clear_cb(const struct
> bpf_prog *prog,
>  	return res;
>  }
> 
> -DECLARE_BPF_DISPATCHER(bpf_dispatcher_xdp)
> +DECLARE_BPF_DISPATCHER(xdp)

yep, that's what I prefer ;-) I'll attach your patch
to my kallsyms changes

thanks,
jirka