From: Oleg Nesterov <oleg@redhat.com>
To: "Christian Brauner (Amutable)" <brauner@kernel.org>
Cc: Jann Horn <jannh@google.com>,
Linus Torvalds <torvalds@linuxfoundation.org>,
"David Hildenbrand (Arm)" <david@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Qualys Security Advisory <qsa@qualys.com>,
Kees Cook <kees@kernel.org>, Minchan Kim <minchan@kernel.org>,
linux-mm@kvack.org, Suren Baghdasaryan <surenb@google.com>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>
Subject: Re: [PATCH RFC v3 3/4] ptrace: add ptracer_access_allowed()
Date: Fri, 22 May 2026 17:08:51 +0200 [thread overview]
Message-ID: <ahBxg9mb5c0aVP8h@redhat.com> (raw)
In-Reply-To: <20260520-work-task_exec_state-v3-3-69f895bc1385@kernel.org>
On 05/20, Christian Brauner (Amutable) wrote:
>
> +bool ptracer_access_allowed(struct task_struct *tsk)
> +{
> + const struct task_exec_state *es;
> +
> + if (!tsk->ptrace)
> + return false;
> + if (current != tsk->parent)
> + return false;
> + guard(rcu)();
Really minor nit feel, free to ignore...
guard(rcu)();
if (ptrace_parent(tsk) != current)
return false;
...
With or without this series, I don't really understand why ptrace_access_vm() needs
these security checks... And ptrace_parent(tsk) == current should be always true?
Oleg.
next prev parent reply other threads:[~2026-05-22 15:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 21:48 [PATCH RFC v3 0/4] exec: introduce task_exec_state for exec-time metadata Christian Brauner (Amutable)
2026-05-20 21:48 ` [PATCH RFC v3 1/4] sched/coredump: introduce enum task_dumpable Christian Brauner (Amutable)
2026-05-22 22:14 ` David Hildenbrand (Arm)
2026-05-20 21:48 ` [PATCH RFC v3 2/4] exec: introduce struct task_exec_state Christian Brauner (Amutable)
2026-05-22 15:00 ` Oleg Nesterov
2026-05-22 22:21 ` David Hildenbrand (Arm)
2026-05-20 21:48 ` [PATCH RFC v3 3/4] ptrace: add ptracer_access_allowed() Christian Brauner (Amutable)
2026-05-22 15:08 ` Oleg Nesterov [this message]
2026-05-22 22:32 ` David Hildenbrand (Arm)
2026-05-20 21:48 ` [PATCH RFC v3 4/4] exec_state: relocate dumpable information Christian Brauner (Amutable)
2026-05-21 10:05 ` Christian Brauner
2026-05-21 11:16 ` Jann Horn
2026-05-21 13:08 ` Christian Brauner
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=ahBxg9mb5c0aVP8h@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=david@kernel.org \
--cc=jannh@google.com \
--cc=kees@kernel.org \
--cc=liam@infradead.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=qsa@qualys.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=torvalds@linuxfoundation.org \
--cc=vbabka@kernel.org \
/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