From: Aleksa Sarai <cyphar@cyphar.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Sargun Dhillon <sargun@sargun.me>,
linux-kernel@vger.kernel.org,
containers@lists.linux-foundation.org, linux-api@vger.kernel.org,
linux-fsdevel@vger.kernel.org, tycho@tycho.ws, jannh@google.com,
christian.brauner@ubuntu.com, oleg@redhat.com,
luto@amacapital.net, viro@zeniv.linux.org.uk,
gpascutto@mozilla.com, ealvarez@mozilla.com, fweimer@redhat.com,
jld@mozilla.com, arnd@arndb.de
Subject: Re: [PATCH v8 2/3] pid: Introduce pidfd_getfd syscall
Date: Sat, 18 Jan 2020 10:14:48 +1100 [thread overview]
Message-ID: <20200117231448.btck3qzepvtz5lcp@yavin> (raw)
In-Reply-To: <20200117230602.GA31944@bombadil.infradead.org>
[-- Attachment #1: Type: text/plain, Size: 807 bytes --]
On 2020-01-17, Matthew Wilcox <willy@infradead.org> wrote:
> On Fri, Jan 03, 2020 at 08:29:27AM -0800, Sargun Dhillon wrote:
> > +SYSCALL_DEFINE3(pidfd_getfd, int, pidfd, int, fd,
> > + unsigned int, flags)
> > +{
> > + struct pid *pid;
> > + struct fd f;
> > + int ret;
> > +
> > + /* flags is currently unused - make sure it's unset */
> > + if (flags)
> > + return -EINVAL;
>
> Is EINVAL the right errno here? Often we use ENOSYS for bad flags to
> syscalls.
I don't think that's right -- every syscall I've seen gives you -EINVAL
for invalid flags (not to mention -ENOSYS would mean userspace would be
confused as to whether the syscall is actually supported by the kernel).
--
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
<https://www.cyphar.com/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2020-01-17 23:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-03 16:29 [PATCH v8 0/3] Add pidfd_getfd syscall Sargun Dhillon
2020-01-03 16:29 ` [PATCH v8 1/3] vfs, fdtable: Add get_task_file helper Sargun Dhillon
2020-01-05 12:47 ` Christian Brauner
2020-01-03 16:29 ` [PATCH v8 2/3] pid: Introduce pidfd_getfd syscall Sargun Dhillon
2020-01-05 13:30 ` Christian Brauner
2020-01-17 23:06 ` Matthew Wilcox
2020-01-17 23:14 ` Aleksa Sarai [this message]
2020-01-03 16:29 ` [PATCH v8 3/3] test: Add test for pidfd getfd Sargun Dhillon
2020-01-05 14:20 ` Christian Brauner
2020-01-05 19:08 ` Sargun Dhillon
2020-01-06 17:19 ` Christian Brauner
2020-01-06 21:06 ` Sargun Dhillon
2020-01-07 8:55 ` Christian Brauner
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=20200117231448.btck3qzepvtz5lcp@yavin \
--to=cyphar@cyphar.com \
--cc=arnd@arndb.de \
--cc=christian.brauner@ubuntu.com \
--cc=containers@lists.linux-foundation.org \
--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 \
--cc=willy@infradead.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).