From: Jiri Olsa <olsajiri@gmail.com>
To: Song Liu <song@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
stable@vger.kernel.org, bpf@vger.kernel.org,
Martin KaFai Lau <kafai@fb.com>,
Eduard Zingerman <eddyz87@gmail.com>,
Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>
Subject: Re: [PATCH bpf 1/2] bpf: Do not release trampoline image in case off unregister error
Date: Sat, 25 Apr 2026 22:40:30 +0200 [thread overview]
Message-ID: <ae0mvi9yCiGakqdH@krava> (raw)
In-Reply-To: <CAPhsuW5rcXABPeOy7PFkHkO8WNyfqppGpB5ijTvmMbj7GVWfcg@mail.gmail.com>
On Fri, Apr 24, 2026 at 08:50:51AM -0700, Song Liu wrote:
> On Fri, Apr 24, 2026 at 8:39 AM Jiri Olsa <jolsa@kernel.org> wrote:
> >
> > If unregister_fentry fails we still have trampoline image attached
> > to a function, so releasing it could trigger crash. Releasing the
> > trampoline image only when the unregister succeeds.
> >
> > Cc: stable@vger.kernel.org
> > Fixes: e21aa341785c ("bpf: Fix fexit trampoline.")
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
>
> The fix looks good.
>
> Acked-by: Song Liu <song@kernel.org>
>
> Can we add a test case that triggers this crash without the fix?
I don't about valid scenario where unregister_fentry would fail now,
that'd be bug that we'd need to fix. We have WARN_ON_ONCE on tampoline
unlink fail.
The fix is meant for when this happens let's go with un-released
trampoline image rather than kernel crash.
jirka
next prev parent reply other threads:[~2026-04-25 20:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 15:39 [PATCH bpf 1/2] bpf: Do not release trampoline image in case off unregister error Jiri Olsa
2026-04-24 15:39 ` [PATCH bpf 2/2] bpf: Remove obsolete WARN_ON call Jiri Olsa
2026-04-24 15:51 ` Song Liu
2026-04-24 15:50 ` [PATCH bpf 1/2] bpf: Do not release trampoline image in case off unregister error Song Liu
2026-04-25 20:40 ` Jiri Olsa [this message]
2026-04-24 16:12 ` sashiko-bot
2026-04-25 21:36 ` Jiri Olsa
2026-04-24 16:22 ` bot+bpf-ci
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae0mvi9yCiGakqdH@krava \
--to=olsajiri@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=kafai@fb.com \
--cc=song@kernel.org \
--cc=songliubraving@fb.com \
--cc=stable@vger.kernel.org \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.