From: bot+bpf-ci@kernel.org
To: mason@kernel.org,brauner@kernel.org,oleg@redhat.com,ast@kernel.org,daniel@iogearbox.net,andrii@kernel.org,bpf@vger.kernel.org,linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org,peterz@infradead.org,mingo@redhat.com,kees@kernel.org,viro@zeniv.linux.org.uk,jack@suse.cz,tj@kernel.org,hannes@cmpxchg.org,mkoutny@suse.com,bsingharora@gmail.com,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,cgroups@vger.kernel.org,linux-fsdevel@vger.kernel.org,linux-mm@kvack.org,mason@kernel.org,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev
Subject: Re: [RFC PATCH v2 8/8] signal: move group_leader into signal_struct
Date: Sat, 5 Dec 2026 13:54:03 +0000 (UTC) [thread overview]
Message-ID: <bfaed1c60f1173ec82e75cfe638b2cf0d25731ad5359d4d974c15dd0d2b0024a@mail.kernel.org> (raw)
In-Reply-To: <20261204233428.14861-9-mason@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 2294 bytes --]
> signal: move group_leader into signal_struct
TL;DR: Removing task_struct::group_leader may break the verifier_arena_cast
selftest, which still reads it via CO-RE. The load may fail and the "arena
cast" subtest may then fail. Unverified; it likely needs converting like the
other selftests.
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index 691a1e322985..123877b74262 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -1104,7 +1104,6 @@ struct task_struct {
> */
> struct list_head children;
> struct list_head sibling;
> - struct task_struct *group_leader;
>
> /*
This removes task_struct::group_leader, but
tools/testing/selftests/bpf/progs/verifier_arena_cast.c still reads it
through its own preserve_access_index definition of struct task_struct:
struct task_struct {
struct task_struct *group_leader;
void *stack;
} __attribute__((preserve_access_index));
...
int untrusted_btf_id(void *ctx)
{
CAST_R6(bpf_get_current_task_btf()->group_leader);
return 0;
}
Because the local struct is used, the file still compiles. At load time,
though, can libbpf resolve the CO-RE relocation for task_struct.group_leader
against a vmlinux BTF that no longer has the field?
If it can't, the load instruction is poisoned and the verifier rejects
untrusted_btf_id(), which is annotated __success with
__msg("R6=untrusted_ptr_task_struct()"). Won't "test_progs -t
verifier_arena_cast" then fail for the "arena cast: an untrusted pointer to
task_struct, it's a move" subtest?
This was the only remaining group_leader reference under
tools/testing/selftests/, and none of the later patches in the series
converts it.
Should it get the same conversion as the other selftests, for example
bpf_get_current_task_btf()->signal->group_leader with a matching local
struct signal_struct? Alternatively, another task_struct pointer field
that the verifier treats as untrusted, such as real_parent read outside an
RCU section, would also satisfy the test.
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/47525108594
next prev parent reply other threads:[~2026-12-05 13:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 13:11 [PATCH v2 0/8] fork, exit: fix use-after-frees on task pointers Chris Mason
2026-12-05 13:11 ` [PATCH v2 1/8] tsacct: don't dereference a stale group_leader Chris Mason
2026-12-05 13:12 ` [PATCH v2 2/8] exec, cgroup, prlimit: prepare for group_leader resets Chris Mason
2026-12-05 15:35 ` Oleg Nesterov
2026-12-05 13:12 ` [PATCH v2 3/8] exit: reset a released task's parent and leader Chris Mason
2026-12-05 13:54 ` bot+bpf-ci
2026-12-05 13:12 ` [PATCH v2 4/8] fork: don't leave stale parent pointers in a new task Chris Mason
2026-12-05 13:12 ` [PATCH v2 5/8] bpf: Don't start a thread walk at a released task Chris Mason
2026-12-05 13:12 ` [PATCH v2 6/8] drm/amdkfd: fix crashes if a debugged process exits Chris Mason
2026-12-05 13:13 ` [RFC PATCH v2 7/8] signal: add task_group_leader() Chris Mason
2026-12-05 15:29 ` Oleg Nesterov
2026-12-05 13:13 ` [RFC PATCH v2 8/8] signal: move group_leader into signal_struct Chris Mason
2026-12-05 13:54 ` bot+bpf-ci [this message]
2026-12-05 15:24 ` Oleg Nesterov
2026-12-06 11:00 ` Oleg Nesterov
2026-12-05 15:59 ` [PATCH] change next_thread() to use list_next_entry_circular() Oleg Nesterov
2026-12-05 16:19 ` Oleg Nesterov
2026-12-05 17:46 ` Chris Mason
2026-12-05 18:17 ` Oleg Nesterov
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=bfaed1c60f1173ec82e75cfe638b2cf0d25731ad5359d4d974c15dd0d2b0024a@mail.kernel.org \
--to=bot+bpf-ci@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=bsingharora@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=hannes@cmpxchg.org \
--cc=ihor.solodrai@linux.dev \
--cc=jack@suse.cz \
--cc=jolsa@kernel.org \
--cc=kees@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=martin.lau@kernel.org \
--cc=martin.lau@linux.dev \
--cc=mason@kernel.org \
--cc=memxor@gmail.com \
--cc=mingo@redhat.com \
--cc=mkoutny@suse.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=sched-ext@lists.linux.dev \
--cc=song@kernel.org \
--cc=tj@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--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®