Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2013447yba; Mon, 15 Apr 2019 03:10:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3olvPYrVj2PPErKcgwODAUmD8hUsMWgqXsmDl7GR+pZrSxnHUb5Doa7LX9gHQgF0NZQ9d X-Received: by 2002:a65:53cb:: with SMTP id z11mr67930703pgr.139.1555323001903; Mon, 15 Apr 2019 03:10:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555323001; cv=none; d=google.com; s=arc-20160816; b=Kr9FPQOX23f2wk9T8vi5+jdW1SPRDcFz9rnLrsHsNZasEljy5aiK7i42Q6+zu6OVwS Bbs01lQ1o7rYx1am9H4oaI/BX1CD53TiyJ8bslkvJXNxBsvD8be9WUeG/QHAGAYXSM5+ MSztl0CAPtDoEvrykALOUUpBT/mG4ZK6zHIUqCXQpCptyZkViFrnoPYJ5F3LmmqqP5fI wW+wSan05K0axeg+LPiA6i7JZoI2Ffxb0zKsbqpbpkE3roib7AMr+DJyRSu5XLSuiBHC ZI+0dvK9H92b/j2mKyo9Ft85znG8Oeg9NvJhvZgSYON9cK09ddSCM0EySRst23UYYKVu Ea8w== 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=QCHPvtbjwANJGGF+dBvhT8d++7EMWW7si5wTHbXQsK4=; b=aH2auqcrgN0ju4TvLZree7N55RKzCnzZ9dbgz5+dc+8wdC7EZsCU4uFfRKnvJWSnJC Yqoy/Oq6s7boG76M9E0ws7BK6yHCC276XqsB4tvT2SPpqQZQodCJNB0anv+pb++RDMNH cHf4cjX2L3p4pzv53H/anVOdVCgVc+ngTttySZW/rT1rfT/0Gh+0WbqcSTX2ZqXfn1FN T05xC3kMLMsAqJJaR5PVw6UkxnBSiwQuqgYXVijUsQEZv4syfwML5bdAb9gAA+BFbH6B jyYnwnVoIFI6s8p8CliwmqECASFeoyCGZ4U1N1WiB/gd9FKtc/ONSonUe6lsI7myhJtM 3Itg== 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 j5si45513310pfi.166.2019.04.15.03.09.45; Mon, 15 Apr 2019 03:10:01 -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 S1726428AbfDOKI6 (ORCPT + 99 others); Mon, 15 Apr 2019 06:08:58 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:44801 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725794AbfDOKI6 (ORCPT ); Mon, 15 Apr 2019 06:08:58 -0400 Received: from [192.168.1.110] ([95.115.91.41]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MZjQl-1hK3Z5495z-00WoSD; Mon, 15 Apr 2019 12:08:13 +0200 Subject: RFC: on adding new CLONE_* flags [WAS 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: Date: Mon, 15 Apr 2019 12:08:09 +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:CppkLBFAQ5VngkZ9OaDM4DFt8Che81pzKFVU8Ac4OttUp1lmrZS b7Emi/b+QPXLshyrmJmnwH+ADdGUtVhAdgzWXFBKLJfFF6BDxEAXZxBkDgQnkG5ZzhcIcA2 syjRZH7pe2QLR6kvltuVCUdJ6PdQkv0SUEGaE/wxjC6HTBlT0MCnFyVo3bpSxOFyf9xPi5v OpNuP6urMZdqlZRMfL+AQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:9TDmmkiFtQI=:FCGjtchip+z2/utjrrxbvh 9RiomPtCgc5XYZ18bEGqE0wkQJukLcffVJwZM1/7U4rXfqBap36yC/G/oOJ5K4u3+n27m0ZzO hwqhVyg4rH3njcezWvEbTMdy/flPha/1NQgnW646z53sKIMM4UP0yjrpZhNM4WdWcyyWKSWGS wFvZusmgXtCUnmQjgKcImD3GExYMYJgqxUMdh7XWutehlSCVW7EYLlpmddKo6GgTv2FBOOGCA MMpriAu/TEqeNSQLxIOvHuzw3yDF92xrq7BjgWC35fxY1mmmpYtmTZMAK2YfRBa856k1bk7QW Qk14g4vAtF1QO3jUuVdADkZpe21JFNC+2G2GOl5ebXo0Aa57G0HpxYByByAXelDyvrwASSrVF +fa6fhx1V2zc/qS8A9DEqqBPJEsyklO22HBulGeRLb8OIwxxLwaUBN0u+skdqD05hKmuZDz9O 6vYOrFFPj79vhW6MdIpFyrpnvUO+nMrEF9HgMe0wo3fRWvLXn9agf3O6QdoycK50F/MA/BW1c YoYkcNl/V3vUpNIYE5MzVqU/A9la6Ch+Pp2caRV30uKaUdMrxCqJqzSyyOihkfqtCWIB4kpFq pOtdATFgGH1EwY+IWmrwp92apd4ryrOdF0rnCcxjd0T4K4Gdvn1TpA20lw3TPpvZvuqRBnnP7 2d7eB+yWvKM7rauN3I9Eu2OVHvWxZ+ubzgBjVfRnUwaMzuMMbuUdXA3fceZWHVLmU90SKJFAJ Rs/qZV4ai207upIyMbVrV2Cxkvi0OXu5sriLf04igvFjEp89z2ituV5ZmE0= 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 folks, > This patchset makes it possible to retrieve pid file descriptors at > process creation time by introducing the new flag CLONE_PIDFD to the > clone() system call as previously discussed. Sorry, for highjacking this thread, but I'm curious on what things to consider when introducing new CLONE_* flags. The reason I'm asking is: I'm working on implementing plan9-like fs namespaces, where unprivileged processes can change their own namespace at will. For that, certain traditional unix'ish things have to be disabled, most notably suid. As forbidding suid can be helpful in other scenarios, too, I thought about making this its own feature. Doing that switch on clone() seems a nice place for that, IMHO. As there might be potentially even more CLONE_* flags in the future, and the bitmask size is limited, this raises the question on how to proceed with those flag additions in the future. What's your thoughts on that ? --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@metux.net -- +49-151-27565287