Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp2433207ybb; Sat, 30 Mar 2019 05:04:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDYxG2Adx+/mWoNXrCtFWK+h8z4zipjkAhtPA09fNVVFwrenapbsDOfWklHJr4Pp1CC8dm X-Received: by 2002:a17:902:9043:: with SMTP id w3mr54059433plz.101.1553947450794; Sat, 30 Mar 2019 05:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553947450; cv=none; d=google.com; s=arc-20160816; b=wOkco57RPZC+vrapVFDXr8n3Q6qm6KtryLfmyizAg8es3zNxktLpz/GLhCYtJV4kCW cJ8s5srHOCWs6X3XVtbrxGKl45wwFXMgj4/2Bxs8kkcmegKcH5XduFbl12yAipvMhgfL xAKwfCfawgoQ4Tl0XQTVcxz18Q55aABfRMyCY9HV6lLJlgsZtpQQjE64qKEvNMdkDrYF 4qG0Yl++snODPC5Th8NJQtJT47Gk1pLpjFHbItUWkJTKQpZZYgRTB+/g0rUcBlKqglOE pDiosJ0Jn4AGrXd36GAffRkPJtGMwu5/UN0jtO+H1q/JTsASBlY/8XiI+g0DGfmpUyyA oadw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=UV02N3sE1F2OKdylbe8fXQ4bNZ3wV0lAf0ObMhdtzBY=; b=qUlZ4SZQ3W3BmBAiM1wGUgwqf7osbm5A+VTEp2KpLMOCAeyHXCKOXEq71vEYBawKcP kvz6sowfyLYi24D0cghcgf1I+nvn01by6beiPYKov7cWZsZzqoNDxiti7EvmfV9HbY41 HflfbmiXtIZLv+q5DYlrofDAjiAeGNHp1FFfd7uQKpn7O3bRTgJUFK4ykc/hx9W4Lnlq VSKO6g4aY8Q9a+w1VFHZPL+pJlu7LGsPPwqG0m72s397CJIDOCrcZZhofTgaih0Nt9eP VV9QP+1ugazx3XFicfUTtYqh0loQxj1svXUunaiZK1PC886rQucCDJxieTTwbZNXcmjl 5ZiQ== 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 f1si4041438pgv.418.2019.03.30.05.03.17; Sat, 30 Mar 2019 05:04:10 -0700 (PDT) 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 S1730698AbfC3MA3 (ORCPT + 99 others); Sat, 30 Mar 2019 08:00:29 -0400 Received: from nov-007-i650.relay.mailchannels.net ([46.232.183.204]:40768 "EHLO nov-007-i650.relay.mailchannels.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730384AbfC3MA2 (ORCPT ); Sat, 30 Mar 2019 08:00:28 -0400 X-Greylist: delayed 370 seconds by postgrey-1.27 at vger.kernel.org; Sat, 30 Mar 2019 08:00:26 EDT X-Sender-Id: novatrend|x-authuser|juerg@bitron.ch Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8D671BE0CA3; Sat, 30 Mar 2019 11:54:12 +0000 (UTC) Received: from srv17.tophost.ch (swiss-ingress-1.ch.mailchannels.com [46.232.183.5]) by relay.mailchannels.net (Postfix) with ESMTPA id 68AC2BE0C60; Sat, 30 Mar 2019 11:54:03 +0000 (UTC) X-Sender-Id: novatrend|x-authuser|juerg@bitron.ch Received: from srv17.tophost.ch (srv17.tophost.ch [193.33.128.155]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.15.2); Sat, 30 Mar 2019 11:54:12 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: novatrend|x-authuser|juerg@bitron.ch X-MailChannels-Auth-Id: novatrend X-Trade-Continue: 27f30e331c53dcfd_1553946852120_2575866182 X-MC-Loop-Signature: 1553946852120:1503120581 X-MC-Ingress-Time: 1553946852119 Received: from [80.219.231.201] (port=47868 helo=jzen.bitron.ch) by srv17.tophost.ch with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hACYg-0004VR-L1; Sat, 30 Mar 2019 12:53:58 +0100 Message-ID: Subject: Re: [PATCH v2 2/5] pid: add pidfd_open() From: =?ISO-8859-1?Q?J=FCrg?= Billeter To: Christian Brauner , jannh@google.com, luto@kernel.org, dhowells@redhat.com, serge@hallyn.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, ebiederm@xmission.com, khlebnikov@yandex-team.ru, keescook@chromium.org, adobriyan@gmail.com, tglx@linutronix.de, mtk.manpages@gmail.com, bl0pbl33p@gmail.com, ldv@altlinux.org, akpm@linux-foundation.org, oleg@redhat.com, nagarathnam.muthusamy@oracle.com, cyphar@cyphar.com, viro@zeniv.linux.org.uk, joel@joelfernandes.org, dancol@google.com Date: Sat, 30 Mar 2019 12:53:57 +0100 In-Reply-To: <20190329155425.26059-3-christian@brauner.io> References: <20190329155425.26059-1-christian@brauner.io> <20190329155425.26059-3-christian@brauner.io> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AuthUser: juerg@bitron.ch Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-03-29 at 16:54 +0100, Christian Brauner wrote: > diff --git a/include/uapi/linux/wait.h b/include/uapi/linux/wait.h > index ac49a220cf2a..d6c7c0701997 100644 > --- a/include/uapi/linux/wait.h > +++ b/include/uapi/linux/wait.h > @@ -18,5 +18,7 @@ > #define P_PID 1 > #define P_PGID 2 > > +/* Get a file descriptor for /proc/ of the corresponding pidfd > */ > +#define PIDFD_GET_PROCFD _IOR('p', 1, int) > > #endif /* _UAPI_LINUX_WAIT_H */ This is missing an entry in Documentation/ioctl/ioctl-number.txt and is actually conflicting with existing entries. However, I'd actually prefer a syscall to allow strict whitelisting via seccomp and avoid the other ioctl disadvantages that Daniel has already mentioned. Cheers, Jürg