[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMw=ZnRFa4bnkvScSUzpHHjrXAiORdjUgthcsyvHkJ6B2TWp0Q@mail.gmail.com>
Date: Mon, 27 Mar 2023 11:18:08 +0000
From: Luca Boccassi <bluca@...ian.org>
To: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@...onical.com>,
davem@...emloft.net
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Leon Romanovsky <leon@...nel.org>,
David Ahern <dsahern@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Kees Cook <keescook@...omium.org>,
Christian Brauner <brauner@...nel.org>, smcv@...labora.com
Subject: Re: [PATCH net-next 0/3] Add SCM_PIDFD and SO_PEERPIDFD
On Mon, 20 Mar 2023 at 14:35, Luca Boccassi <bluca@...ian.org> wrote:
>
> On Thu, 2023-03-16 at 14:15 +0100, Alexander Mikhalitsyn wrote:
> > 1. Implement SCM_PIDFD, a new type of CMSG type analogical to SCM_CREDENTIALS,
> > but it contains pidfd instead of plain pid, which allows programmers not
> > to care about PID reuse problem.
> >
> > 2. Add SO_PEERPIDFD which allows to get pidfd of peer socket holder pidfd.
> > This thing is direct analog of SO_PEERCRED which allows to get plain PID.
> >
> > 3. Add SCM_PIDFD / SO_PEERPIDFD kselftest
> >
> > Idea comes from UAPI kernel group:
> > https://uapi-group.org/kernel-features/
> >
> > Big thanks to Christian Brauner and Lennart Poettering for productive
> > discussions about this.
> >
> > Cc: "David S. Miller" <davem@...emloft.net>
> > Cc: Eric Dumazet <edumazet@...gle.com>
> > Cc: Jakub Kicinski <kuba@...nel.org>
> > Cc: Paolo Abeni <pabeni@...hat.com>
> > Cc: Leon Romanovsky <leon@...nel.org>
> > Cc: David Ahern <dsahern@...nel.org>
> > Cc: Arnd Bergmann <arnd@...db.de>
> > Cc: Kees Cook <keescook@...omium.org>
> > Cc: Christian Brauner <brauner@...nel.org>
> >
> > Alexander Mikhalitsyn (3):
> > scm: add SO_PASSPIDFD and SCM_PIDFD
> > net: core: add getsockopt SO_PEERPIDFD
> > selftests: net: add SCM_PIDFD / SO_PEERPIDFD test
>
> I've implemented support for this in dbus-daemon:
>
> https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/398
>
> It's working very well. I am also working on the dbus-broker and polkit
> side of things, will share the links here once they are in a reviewable
> state. But the dbus-daemon implementation is enough to meaningfully
> test this.
>
> For the series:
>
> Tested-by: Luca Boccassi <bluca@...ian.org>
Polkit changes:
https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/154
Powered by blists - more mailing lists