linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Sargun Dhillon <sargun@sargun.me>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Linux Containers" <containers@lists.linux-foundation.org>,
	"Linux API" <linux-api@vger.kernel.org>,
	"Linux FS-devel Mailing List" <linux-fsdevel@vger.kernel.org>,
	"Tycho Andersen" <tycho@tycho.ws>, "Jann Horn" <jannh@google.com>,
	"Aleksa Sarai" <cyphar@cyphar.com>,
	"Christian Brauner" <christian.brauner@ubuntu.com>,
	"Oleg Nesterov" <oleg@redhat.com>,
	"Andy Lutomirski" <luto@amacapital.net>,
	"Al Viro" <viro@zeniv.linux.org.uk>,
	"Gian-Carlo Pascutto" <gpascutto@mozilla.com>,
	"Emilio Cobos Álvarez" <ealvarez@mozilla.com>,
	"Florian Weimer" <fweimer@redhat.com>,
	"Jed Davis" <jld@mozilla.com>
Subject: Re: [PATCH v9 2/4] pid: Implement pidfd_getfd syscall
Date: Mon, 13 Jan 2020 15:58:07 +0100	[thread overview]
Message-ID: <CAK8P3a10iVg6dyvGGLjjdvyUcBQhzC5zmwBzS_Bfpk0FQE4k5Q@mail.gmail.com> (raw)
In-Reply-To: <20200107175927.4558-3-sargun@sargun.me>

On Tue, Jan 7, 2020 at 6:59 PM Sargun Dhillon <sargun@sargun.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@arndb.de>

  reply	other threads:[~2020-01-13 14:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 17:59 [PATCH v9 0/4] Add " Sargun Dhillon
2020-01-07 17:59 ` [PATCH v9 1/4] vfs, fdtable: Add fget_task helper Sargun Dhillon
2020-01-13 15:02   ` Arnd Bergmann
2020-01-07 17:59 ` [PATCH v9 2/4] pid: Implement pidfd_getfd syscall Sargun Dhillon
2020-01-13 14:58   ` Arnd Bergmann [this message]
2020-01-07 17:59 ` [PATCH v9 3/4] arch: wire up " Sargun Dhillon
2020-01-13 14:59   ` Arnd Bergmann
2020-01-07 17:59 ` [PATCH v9 4/4] test: Add test for pidfd getfd Sargun Dhillon
2020-01-07 20:54 ` [PATCH v9 0/4] Add pidfd_getfd syscall Christian Brauner
2020-01-10 11:40   ` Christian Brauner
2020-03-31 20:11 ` RFC: pidfd_getfd(2) manual page Michael Kerrisk (man-pages)

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=CAK8P3a10iVg6dyvGGLjjdvyUcBQhzC5zmwBzS_Bfpk0FQE4k5Q@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=christian.brauner@ubuntu.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=cyphar@cyphar.com \
    --cc=ealvarez@mozilla.com \
    --cc=fweimer@redhat.com \
    --cc=gpascutto@mozilla.com \
    --cc=jannh@google.com \
    --cc=jld@mozilla.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=oleg@redhat.com \
    --cc=sargun@sargun.me \
    --cc=tycho@tycho.ws \
    --cc=viro@zeniv.linux.org.uk \
    --subject='Re: [PATCH v9 2/4] pid: Implement pidfd_getfd syscall' \
    /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

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox