Re: [PATCH bpf] bpf: handle the return of ftrace_set_filter_ip in register_fentry

From: Menglong Dong

Date: Mon Nov 10 2025 - 22:19:00 EST


On 2025/11/11 08:59, Menglong Dong wrote:
> On 2025/11/10 23:49, Song Liu wrote:
> > On Mon, Nov 10, 2025 at 4:07 AM Menglong Dong <menglong8.dong@xxxxxxxxx> wrote:
> > >
> > > The error that returned by ftrace_set_filter_ip() in register_fentry() is
> > > not handled properly. Just fix it.
> > >
> > > Fixes: 00963a2e75a8 ("bpf: Support bpf_trampoline on functions with IPMODIFY (e.g. livepatch)")
> > > Signed-off-by: Menglong Dong <dongml2@xxxxxxxxxxxxxxx>
> > > ---
> > > kernel/bpf/trampoline.c | 4 +++-
> > > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > LGTM. Thanks for the fix!
> >
> > Acked-by: Song Liu <song@xxxxxxxxxx>
> >
> > Can we add a test for this code path?
>
> I think it can be done by attach a fentry to a notrace function and
> check the error number.

Hmm...it's a little difficult to trigger this problem, as attaching a
notrace function won't go to this code patch ;|

>
> Let me have a try.
>
> >
> > Song
> >
> >
>
>
>
>
>
>