[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230811114711.GA24141@redhat.com>
Date: Fri, 11 Aug 2023 13:47:11 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Christian Brauner <brauner@...nel.org>
Cc: David Rheinsberg <david@...dahead.eu>,
linux-kernel@...r.kernel.org, Jan Kara <jack@...e.cz>,
Kees Cook <keescook@...omium.org>,
Alexander Mikhalitsyn <alexander@...alicyn.com>,
Luca Boccassi <bluca@...ian.org>
Subject: Re: [PATCH] pid: allow pidfds for reaped tasks
As I said, I am not sure I understand the problem. And I know nothing
about net/ but...
On 08/07, Christian Brauner wrote:
>
> > SO_PEERPIDFD returns `EINVAL` if the peer-task was already reaped,
> > but returns a stale pidfd if the task is reaped immediately after the
> > respective alive-check.
after the quick grep it seems that SO_PEERPIDFD can simply use
__pidfd_prepare() ? We know that sk->sk_peer_pid was initialized with
task_tgid(current) and thus we know it is (was) a valid TGID pid.
The same is probably true for scm->pid and scm_pidfd_recv()...
But again, I am not familiar with this code, I can be wrong.
Oleg.
Powered by blists - more mailing lists