Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9607098ybl; Fri, 17 Jan 2020 15:16:19 -0800 (PST) X-Google-Smtp-Source: APXvYqz3ebV+LvmfHDLC8Uc84kVr+DvCIguaykB62A+ZwAoEe3C+I+vKDRbuoVK1ItZd0NnAlG0M X-Received: by 2002:a9d:7552:: with SMTP id b18mr7674593otl.20.1579302979197; Fri, 17 Jan 2020 15:16:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579302979; cv=none; d=google.com; s=arc-20160816; b=COYI33KnprF24GvyrQ3qN0GyVWHE3K/SYFpZI1Oc37bF302oyUIt4YK8hfkxatt0mD YeEW5hNgiLqVZH48Eroz/TYf9nIQxyp9GVBIV1ndKLYW+JAfdVGgLjOVqRgqQY19scTv ydslTop9JdWgBOn24qe8oksz0KBijp7qKtTpYWTWY7EQfHNLljdAo/1jI3qe20Hhrvgo MB2usfuItghhliIRdgQqJW1OkVyJetSkr4+nlsCZLiUS2nAp9lF34+QvkkR3WuckrRI6 jDnS6HGGsLty9p3ntcLj6OEwC9lHkmuYtVL35m4BEH73tXyJRL043OqTVRuxohpCE4+C o4zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=jzeKjbEOoZufDt62e7KFi+TYVfZFKRr3y7gwnRiY8Wo=; b=DtLLQjTzYgN1M7u1/OK5iXY7qHBG0kFUdU2Q6Cuh3eS6QJMP/BqzxH6hg+RFN/CXSp e40IpVSgQIvNTxbEAiFO7l5z5TgtFpuCImsB2Q3F+m627+kA3KzrFNrw+E7u8sXU9Jft hFKKYMYT9S38Te+XzF7F4+5qCzyEk4jCf5wVnQIoGU7m3AwUHezcmUJs6Ca2i0B3XVms CLAg+MmfhhA4rusUWyoEr61QWdHDj+9kbTDaGXVQKUaqR9Sbx0cOKOTFizJE7XgCaU2Z PZLxozuf1L7Z7nchbmuQl+RJwIoqgs7SFikmt6lROe5e3C02UdjA6rTh/lqzw5YvVou+ jK0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4si16157675otn.281.2020.01.17.15.16.07; Fri, 17 Jan 2020 15:16:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730190AbgAQXPN (ORCPT + 99 others); Fri, 17 Jan 2020 18:15:13 -0500 Received: from mout-p-102.mailbox.org ([80.241.56.152]:56462 "EHLO mout-p-102.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729354AbgAQXPN (ORCPT ); Fri, 17 Jan 2020 18:15:13 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 47zxjp0568zKmMr; Sat, 18 Jan 2020 00:15:10 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id ZU5ubjiWgZHp; Sat, 18 Jan 2020 00:15:06 +0100 (CET) Date: Sat, 18 Jan 2020 10:14:48 +1100 From: Aleksa Sarai To: Matthew Wilcox Cc: Sargun Dhillon , 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 Message-ID: <20200117231448.btck3qzepvtz5lcp@yavin> References: <20200103162928.5271-1-sargun@sargun.me> <20200103162928.5271-3-sargun@sargun.me> <20200117230602.GA31944@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qclidy4gbrtvcf5h" Content-Disposition: inline In-Reply-To: <20200117230602.GA31944@bombadil.infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --qclidy4gbrtvcf5h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-01-17, Matthew Wilcox 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; >=20 > 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). --=20 Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH --qclidy4gbrtvcf5h Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSxZm6dtfE8gxLLfYqdlLljIbnQEgUCXiI/4QAKCRCdlLljIbnQ EsZ4AP4r48SZU+VGb0kNxiTIYaI9vcaP9MHT16G7vRJU0mdV3gD5AVigsJnWLW0m gZGhf7y0bY18y31c5t2ijCRxidRHWAQ= =mswC -----END PGP SIGNATURE----- --qclidy4gbrtvcf5h--