[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a10iVg6dyvGGLjjdvyUcBQhzC5zmwBzS_Bfpk0FQE4k5Q@mail.gmail.com>
Date: Mon, 13 Jan 2020 15:58:07 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Sargun Dhillon <sargun@...gun.me>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linux Containers <containers@...ts.linux-foundation.org>,
Linux API <linux-api@...r.kernel.org>,
Linux FS-devel Mailing List <linux-fsdevel@...r.kernel.org>,
Tycho Andersen <tycho@...ho.ws>, Jann Horn <jannh@...gle.com>,
Aleksa Sarai <cyphar@...har.com>,
Christian Brauner <christian.brauner@...ntu.com>,
Oleg Nesterov <oleg@...hat.com>,
Andy Lutomirski <luto@...capital.net>,
Al Viro <viro@...iv.linux.org.uk>,
Gian-Carlo Pascutto <gpascutto@...illa.com>,
Emilio Cobos Álvarez <ealvarez@...illa.com>,
Florian Weimer <fweimer@...hat.com>,
Jed Davis <jld@...illa.com>
Subject: Re: [PATCH v9 2/4] pid: Implement pidfd_getfd syscall
On Tue, Jan 7, 2020 at 6:59 PM Sargun Dhillon <sargun@...gun.me> wrote:
> +/**
> + * sys_pidfd_getfd() - Get a file descriptor from another process
> + *
> + * @pidfd: the pidfd file descriptor of the process
> + * @fd: the file descriptor number to get
> + * @flags: flags on how to get the fd (reserved)
> + *
> + * This syscall gets a copy of a file descriptor from another process
> + * based on the pidfd, and file descriptor number. It requires that
> + * the calling process has the ability to ptrace the process represented
> + * by the pidfd. The process which is having its file descriptor copied
> + * is otherwise unaffected.
> + *
> + * Return: On success, a cloexec file descriptor is returned.
> + * On error, a negative errno number will be returned.
> + */
> +SYSCALL_DEFINE3(pidfd_getfd, int, pidfd, int, fd,
> + unsigned int, flags)
This is the most sensible definition I can see. I can not tell
whether we should or want to have it, but if everyone thinks
this is a good idea, then this ABI makes sense.
Reviewed-by: Arnd Bergmann <arnd@...db.de>
Powered by blists - more mailing lists