Re: [PATCH bpf] bpf: handle the return of ftrace_set_filter_ip in register_fentry
From: Menglong Dong
Date: Mon Nov 10 2025 - 19:59:35 EST
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.
Let me have a try.
>
> Song
>
>