Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2020045yba; Mon, 15 Apr 2019 03:19:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQDWZnolANngAYIiTmZ7J8sV8aztJNF/Ena5ChqOYqzky+3rIYZ2dFD0+is8rlPdpeDqF1 X-Received: by 2002:a63:4e10:: with SMTP id c16mr69055817pgb.302.1555323554758; Mon, 15 Apr 2019 03:19:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555323554; cv=none; d=google.com; s=arc-20160816; b=wHYpoZDjtI3Q53Kak390ps9IHsUxTnT4Y7bxB62Cm52LDDkngAnYnQzUi3Sk5XnHn3 lM1ztPClXw6/oatuekxBXWzir7c6sE9/cva5ZBJczwgIzJjcm+o9ynsyxloWhN2MUbFr U/BBpvOXr+kE1xZBTEQUZsLcRfU6DvJYlkCXWQ/KtnGvviNGG6KQDxcfEjpCWd9Nycku pWWL08pNaVGpc2Mu3MVKXjqnApt5UwvI76I59Q0i+uZwLs/dZZ/MuKkfOwAlD7FwU+Yo NIUBJ9QkmwybQxqwhMgeSPfZ3ylbr88Or91jK8t+AYtvgTzaVCszyV9upMOfRflGg4I8 Oasw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=wJrIM3sXa4s9cCMc0xlZEMu8kfx68pAJ0FNWWAo5NjM=; b=Sh7z2OPFFktDYS84NZgSf7YFNRSQYvds3Ttku7hCKKxFpkxVdj9rAmHfCiNoDTFTi9 B6dJXF3mPtBC55oki7xoPLPQCkc2Puj+MZeViCWxrsj/vt02pEGI4meu00Q7ktQvais3 MYI9qbYW6AKRkeBDcySRLuxdG8pLIL2vFjbgshz8ZuUEmEOtRzYUlvKnzW+ICvNwynk8 /tD7XF9ZGaFJm7fneQR2biou14KI8VvFDaLglWmNB20oqJpMIIXAZjyVgpPmAkcYt8fd D2uMy7zlTSgWmFBTUjeXKEt4V8yIcobZAa/skyp2VYm6bSo281UOxoEHjh4BgiTDphBW lClw== 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 92si25905667pli.8.2019.04.15.03.18.59; Mon, 15 Apr 2019 03:19:14 -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 S1727148AbfDOKRm (ORCPT + 99 others); Mon, 15 Apr 2019 06:17:42 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:51873 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726287AbfDOKRl (ORCPT ); Mon, 15 Apr 2019 06:17:41 -0400 Received: from [192.168.1.110] ([95.115.91.41]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MyseA-1guZxv1cws-00vuvR; Mon, 15 Apr 2019 12:17:01 +0200 Subject: Re: [PATCH 0/4] clone: add CLONE_PIDFD To: Christian Brauner , torvalds@linux-foundation.org, viro@zeniv.linux.org.uk, jannh@google.com, dhowells@redhat.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Cc: serge@hallyn.com, luto@kernel.org, arnd@arndb.de, ebiederm@xmission.com, keescook@chromium.org, tglx@linutronix.de, mtk.manpages@gmail.com, akpm@linux-foundation.org, oleg@redhat.com, cyphar@cyphar.com, joel@joelfernandes.org, dancol@google.com References: <20190414201436.19502-1-christian@brauner.io> From: "Enrico Weigelt, metux IT consult" Organization: metux IT consult Message-ID: <81fa3d00-70be-0d41-e145-60285e23687d@metux.net> Date: Mon, 15 Apr 2019 12:16:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190414201436.19502-1-christian@brauner.io> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:ilDg3EbtXxkEvgvS8h/9sd/77k13CHF2jKgwBVmi7h3H7vnkkqL /oNXCe0zaR/E0oFGuDZpclLaa9sh3XHHyPH+19afoyZPmrPsBbsUDKHmX8dnX4pYgtsUvlD LmDkmLcnYGc8U/D5HIjSgUDnp3DXYolqS1oFALAPhK6wt79psYR69cXRL5VEO/qHfrvug+x PjIsAC2g2BaJUuQ27pJPA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:KevQ2pSIMQk=:2nxwiZowLEW3BNBTmqxBD1 m6IwxsuMi6Sr+X5KmzOh8bK1E+RXG/iQlthjnLcqAGhEyFsAC1XzPENKImUBPNbHsiptbP9Jm Cp1IiMWHgn0M50Wy5j+QFyLlfCQJ5OgY7nk+GkPWuQCAsyop/VEfu13V2OaYKpYbt7TZ0X0B/ zDLhemzEgLbxbnKIuiXN9JiVEFgv1wArHGteYQI/IuFJVQ14JjX30lzK+BlnE9EXKvHQoFqUJ wSRurA/OwBB8+aHFcroM/CuT2hiyqSvWR8n3TTHlsC2pY0LnU3p5m3tGXsnXFvaDUpLfyu2p7 P3mxGuDF1XduCtVn69jRSgC2AlwVYypAUJTMyR4ovMAQRnwvzXHH9SRMOvJNtau4uDToAEpxH GhqfoUIuItYI/JEqQLXZKjnfUgSrKheFPAL4xixLnayubNDkUgpKDzX9ya5qatCGCRJN2koty hy2Kq1HgkrmdAH0kHw4CHEHA8Ofu8jfdwM0yk2wPKM+p2Q4gXbDdGnlyqHO7IjiDtrlkq1Oiz zoNIOA7irFFHmQIyTAbPO5alLBEYojKlOA8v9g1OhY5LWD8W/KcRGpjWckvct0M3VpBQ/j2iL 7K74+cvpovK+mLvBN7cFj9Ey/RPugwwWJyN0nLQmKfFsrEaW0YXeuoRGetjBtQvYC1n1GZv3A zDP/k1avusYCzOt44a8AHaPFQgcRS9G1KGfJIfhhWnVEmMaLnWz0Fuzr6wIFycW1k0bVeMz4g +amb4a4Kn417R09eUC0FRu8X5OMM7jVDhuDJ8wlZqNeWKTqMGXfTXgOV2AQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14.04.19 22:14, Christian Brauner wrote: Hi, > When clone is called with CLONE_PIDFD a pidfd instead of a pid will be > returned. Uh, changing the return type by some flags produces a very strange feeling in my stomach. Isn't there any other way for fetching a pidfs for some pid ? > To make it possible for users of CLONE_PIDFD to apply standard > error checking that is common all across userspace, file descriptor > numbering for pidfds starts at 1 and not 0. Feels even more strange. I'm used to the kernel always picking the lowest available pid. In some cases, one really wants to have fd 0. Even though the actual usecases for doing that w/ a pidfd might be pretty limited, I don't feel good w/ breaking this old habit. --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@metux.net -- +49-151-27565287