From: Oleg Nesterov <oleg@redhat.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Chris Mason <mason@kernel.org>,
brauner@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, peterz@infradead.org,
mingo@redhat.com, kees@kernel.org, tj@kernel.org,
eddyz87@gmail.com, memxor@gmail.com, yonghong.song@linux.dev,
martin.lau@linux.dev, song@kernel.org, jolsa@kernel.org,
emil@etsalapatis.com, ihor.solodrai@linux.dev,
sched-ext@lists.linux.dev
Subject: Re: [PATCH 0/3] fork, exit: fix BPF use-after-frees on task pointers
Date: Fri, 4 Dec 2026 13:53:50 +0100 [thread overview]
Message-ID: <axK33uJhPRE44uua@redhat.com> (raw)
In-Reply-To: <DNBLK9RDUGDB.9IRD3EGPT1GZ@gmail.com>
On 12/04, Alexei Starovoitov wrote:
>
> BUT the title is misleading.
> The kernel has the same bug without bpf. fill_stats_for_pid() holds
> a reference on tsk and nothing else. Then bacct_add_tsk() reads
> tsk->group_leader->start_time.
Oh yes, and IIRC there are more buggy users of ->group_leader
> > Patch 2 makes a released thread hold a reference on its group leader,
> > which I don't love. If there are better ideas, I'm happy to get
> > the bots cranking on them.
I think we should move ->group_leader from task_struct to ->signal_struct.
I was going to do this a long ago, but was distructed. See the preparations
I sent https://lore.kernel.org/all/aXY_h8i78n6yD9JY@redhat.com/
I'll try to take a look this weekend, I need to recall the implications.
But ->real_parent has to stay per task, and I don't really understand 1/3,
even the changelog.
Oleg.
next prev parent reply other threads:[~2026-12-04 12:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 20:06 [PATCH 0/3] fork, exit: fix BPF use-after-frees on task pointers Chris Mason
2026-12-03 20:06 ` [PATCH 1/3] fork: make the creator the parent of an unlinked task Chris Mason
2026-12-03 20:31 ` sashiko-bot
2026-12-04 15:27 ` Oleg Nesterov
2026-12-04 16:27 ` Chris Mason
2026-12-03 20:06 ` [PATCH 2/3] exit: don't leave stale parent and leader pointers Chris Mason
2026-12-03 20:31 ` sashiko-bot
2026-12-03 20:55 ` bot+bpf-ci
2026-12-03 20:06 ` [PATCH 3/3] bpf: Don't start a thread walk at a released task Chris Mason
2026-12-03 20:42 ` bot+bpf-ci
2026-12-04 2:36 ` [PATCH 0/3] fork, exit: fix BPF use-after-frees on task pointers Alexei Starovoitov
2026-12-04 12:53 ` Oleg Nesterov [this message]
2026-12-04 15:36 ` Chris Mason
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=axK33uJhPRE44uua@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=ihor.solodrai@linux.dev \
--cc=jolsa@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mason@kernel.org \
--cc=memxor@gmail.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=sched-ext@lists.linux.dev \
--cc=song@kernel.org \
--cc=tj@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 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.