From: Tejun Heo <tj@kernel.org>
To: Qiliang Yuan <odys.yuan@gmail.com>
Cc: Andrii Nakryiko <andrii@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Ihor Solodrai <ihor.solodrai@linux.dev>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
Jiri Olsa <jolsa@kernel.org>,
Emil Tsalapatis <emil@etsalapatis.com>,
Shuah Khan <shuah@kernel.org>, Amery Hung <ameryhung@gmail.com>,
bpf@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, sched-ext@lists.linux.dev
Subject: Re: [PATCH bpf-next v6 0/4] bpf: Fix a struct_ops use-after-free behind a flaky assoc_in_timer test
Date: Fri, 23 Oct 2026 12:47:19 -1000 [thread overview]
Message-ID: <a5551d69c989776eeb576456f0056fb9@kernel.org> (raw)
In-Reply-To: <20261022-selftests-bpf-struct-ops-assoc-timer-v6-0-2c0f18e82582@gmail.com>
Hello,
The following is a Claude-generated review.
On Thu, Oct 22, 2026 at 04:48:35PM +0800, Qiliang Yuan wrote:
> grace period of bpf_map_put(), so nothing waits for a prog that reads
> the association in between.
sched_ext hits the same use-after-free. Its kfuncs find the scheduler
through bpf_prog_get_assoc_struct_ops() in scx_prog_sched(), from bpf_timer
callbacks too, such as central_timerfn() in scx_central. The series fixes
that as well.
5db69b0fbdc8 ("bpf: Make struct_ops tasks_rcu grace period optional") is in
the bpf-next-7.4 pull, so the bug lands in 7.4-rc1. Can the fix go through
bpf for 7.4-rc?
Thanks.
--
tejun
next prev parent reply other threads:[~2026-10-23 22:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 8:48 Qiliang Yuan
2026-10-22 8:48 ` [PATCH bpf-next v6 1/4] bpf: Protect the struct_ops association with a spinlock Qiliang Yuan
2026-10-22 8:48 ` [PATCH bpf-next v6 2/4] bpf: Dissociate struct_ops progs before the grace period of the map Qiliang Yuan
2026-10-22 8:48 ` [PATCH bpf-next v6 3/4] selftests/bpf: Test freeing a struct_ops map under a running prog Qiliang Yuan
2026-10-22 8:48 ` [PATCH bpf-next v6 4/4] selftests/bpf: Wait for the struct_ops map to be freed in assoc_in_timer Qiliang Yuan
2026-10-23 21:06 ` [PATCH bpf-next v6 0/4] bpf: Fix a struct_ops use-after-free behind a flaky assoc_in_timer test Amery Hung
2026-10-23 22:47 ` Tejun Heo [this message]
2026-10-24 3:50 ` patchwork-bot+netdevbpf
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=a5551d69c989776eeb576456f0056fb9@kernel.org \
--to=tj@kernel.org \
--cc=ameryhung@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=ihor.solodrai@linux.dev \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=odys.yuan@gmail.com \
--cc=sched-ext@lists.linux.dev \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®