[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMw=ZnQLN3KA8pBtEGKGMcM4sKtWN2inz=EhB=Y5JN7CSBEgpQ@mail.gmail.com>
Date: Tue, 8 Oct 2024 13:12:18 +0100
From: Luca Boccassi <luca.boccassi@...il.com>
To: Christian Brauner <brauner@...nel.org>
Cc: linux-fsdevel@...r.kernel.org, christian@...uner.io,
linux-kernel@...r.kernel.org, oleg@...hat.com
Subject: Re: [PATCH v8] pidfd: add ioctl to retrieve pid info
On Tue, 8 Oct 2024 at 13:10, Christian Brauner <brauner@...nel.org> wrote:
>
> On Tue, Oct 08, 2024 at 10:07:18AM GMT, luca.boccassi@...il.com wrote:
> > From: Luca Boccassi <luca.boccassi@...il.com>
> >
> > A common pattern when using pid fds is having to get information
> > about the process, which currently requires /proc being mounted,
> > resolving the fd to a pid, and then do manual string parsing of
> > /proc/N/status and friends. This needs to be reimplemented over
> > and over in all userspace projects (e.g.: I have reimplemented
> > resolving in systemd, dbus, dbus-daemon, polkit so far), and
> > requires additional care in checking that the fd is still valid
> > after having parsed the data, to avoid races.
> >
> > Having a programmatic API that can be used directly removes all
> > these requirements, including having /proc mounted.
> >
> > As discussed at LPC24, add an ioctl with an extensible struct
> > so that more parameters can be added later if needed. Start with
> > returning pid/tgid/ppid and creds unconditionally, and cgroupid
> > optionally.
> >
> > Signed-off-by: Luca Boccassi <luca.boccassi@...il.com>
> > ---
>
> I think Josh's point about dropping result_mask is fair. I can do that
> when I apply though.
I can quickly test and send v9 dropping result_mask, not a problem
Powered by blists - more mailing lists