Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4157675yba; Wed, 17 Apr 2019 05:56:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCtwhPhw4ST2Uu0qxHNciskIa8hH+TTVNgsxnixmTGp0G6HqwWsGfqbc9Me+MTXPhHBDPh X-Received: by 2002:a17:902:2de4:: with SMTP id p91mr86785910plb.191.1555505814262; Wed, 17 Apr 2019 05:56:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555505814; cv=none; d=google.com; s=arc-20160816; b=DPhoqV6vdPg/JHAGg2JjtL3HK9hfkOwRHYom6mqglVtK3/U97QYa5vQaeMHk4WVLhe oBe4axFbu+Jwt2Lqvil8Y/7G/h8dl91zQuNNLQ7hKwvTAo4iLzyl5fc34Wo9nhns9sEe 8eAbRj6pYb8lH2CFq6BMZNEIC8yQ8mvcnoGF1wvAviIpIS6fJS58ggm9uyrVcVTvJO1u X/lhh3mdD88/s7NyNfNbUcB7bl+kp/87fgPDu4s/Vkvi42MZs6z5nsRfCaZL04sMJ9FS 02I3zNouH16lAh5wnsvQ3RNL1F2SKv8BFV6S3RreWrqE9XJZAg+28nSlDtznf5E76jbJ tL2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6saxc2kTeaHnspIYfhRGji+8DaiZiZ+BM5zhQWik19w=; b=wTg1D1yk6khvoixL1Oi6mATDMKzpfbNmvhRTKONuaJyuKLrEFZ3KUmZHXB0MooipXw h2lfAJJPVbNBJAqaApbR55yn71HeREoJ+TAf89qdNmY3DOFGhKcy1G0W+IAGHs2GokL/ my9jH8BHZ2T9rgD5Hdm0dvXWwvL9VT2YUIZIvk4rnLDG9yW+svUL0SnQToVaLxsWGvX8 U47TbcVByMsP5nDt3D0dea4PNh3ORyao1rxIlRQH03sCJ6ZJ5b1/ScLdQV4jsbU5klxk eysSrOsVvVE6FEtg1UpGmra/Q4i9h3MzxU4Ac12Fe3309AKGcYOXVoIN+x45tPFjefut 6kFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=ExNi4No3; 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 l71si33878059pge.428.2019.04.17.05.56.38; Wed, 17 Apr 2019 05:56:54 -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; dkim=pass header.i=@brauner.io header.s=google header.b=ExNi4No3; 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 S1731960AbfDQMy2 (ORCPT + 99 others); Wed, 17 Apr 2019 08:54:28 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:42940 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727034AbfDQMy2 (ORCPT ); Wed, 17 Apr 2019 08:54:28 -0400 Received: by mail-wr1-f65.google.com with SMTP id g3so31784085wrx.9 for ; Wed, 17 Apr 2019 05:54:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6saxc2kTeaHnspIYfhRGji+8DaiZiZ+BM5zhQWik19w=; b=ExNi4No3r5ALAgrtFxr7ZSweILHDqvS0xKIvxhfu8IAuHh4xairEAUGf6TG6Ijm7kh USpnAfoWv8R8UzTUCT5Qmu4zvt5IIX0Vwl9tilTledUFWNLzrN0UyxDM/341DTuOTiCB c1lV1xBpEi/2pmPmPFnw1fAAA6CFKFZYOmkWdW3hFxgsa+bxdA0C3Ngns902zOUL4g/9 UCgZk5sM4GMGfKI40ASWx1hC5RtP2QzY43/oF4e50rLip+tEt+wD8QxF9TesT0f74qmg uLnEyZbFwU5/UF95a7/shVNVm4TjV6m2K69wTvl9HIZODdmiEyO4oTj2EQetX1ed/djY KVPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=6saxc2kTeaHnspIYfhRGji+8DaiZiZ+BM5zhQWik19w=; b=TEu16jwyHl+dWkiwJ3PKWAd7T9T0WMcbvC7xUqhyiyjfKmlPmVsKizzmmthw3viLxx Q4htr0sZBUATD4g6E9yNDGZObtAiTX/cozzZtzd5ZTqf8uRPN724biBYzsIZV2v10D5e 8w6KHujWegssnHpjntFaDvJ7cSxiu4OWYS87sBSKfydfGlQA2g4dXvPD5dWG+vI/Lc/W maDrbqWiiWsIk4OjWZ6PT2edwOvhCeTR8Hithlog7z6lIqQdGdDp6Cf6XP/k8lw9G1V9 AjdUInflCIVTmdUmoigr+dhOnqQ0WEkp580c0+42XQs55DtnxS+12iM1YiR3v9hfbiXw fdrg== X-Gm-Message-State: APjAAAUBHRjNs1Mq2rGt+b++jCG9JwrigH0SbIErJ4rU2jYuapZbyg/Z Amk7sV40ZNaa869qq94OyT3V5A== X-Received: by 2002:a5d:4d42:: with SMTP id a2mr57635518wru.130.1555505666491; Wed, 17 Apr 2019 05:54:26 -0700 (PDT) Received: from brauner.io ([185.197.132.10]) by smtp.gmail.com with ESMTPSA id i17sm59701224wrs.44.2019.04.17.05.54.24 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 17 Apr 2019 05:54:25 -0700 (PDT) Date: Wed, 17 Apr 2019 14:54:23 +0200 From: Christian Brauner To: "Enrico Weigelt, metux IT consult" Cc: Andy Lutomirski , Aleksa Sarai , Linus Torvalds , Al Viro , Jann Horn , David Howells , Linux API , LKML , "Serge E. Hallyn" , Arnd Bergmann , "Eric W. Biederman" , Kees Cook , Thomas Gleixner , Michael Kerrisk , Andrew Morton , Oleg Nesterov , Joel Fernandes , Daniel Colascione Subject: Re: RFC: on adding new CLONE_* flags [WAS Re: [PATCH 0/4] clone: add CLONE_PIDFD] Message-ID: <20190417125422.bhyrmzom4kwuenwm@brauner.io> References: <20190414201436.19502-1-christian@brauner.io> <20190415195911.z7b7miwsj67ha54y@yavin> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 17, 2019 at 02:03:16PM +0200, Enrico Weigelt, metux IT consult wrote: > On 16.04.19 23:31, Andy Lutomirski wrote: > > >> How exactly would the pidfd improve this scenario ? > >> IMHO, would just need to pass the inherited fd's to that daemon (eg. > >> via unix socket) which then sets them up in the new child process. > > > > It makes it easier to wait until the privileged program exits. > > Without pidfd, you can't just wait(2) because the program that gets > > spawned isn't a child. > > Ah, that is a cool thing ! > I suppose that also works across namespaces ? Yes, it should. If you hand off the pidfd to another pidns (e.g. via SCM credentials) for example. > > What other things can be done via pidfd ? Very basic things right now and until CLONE_PIDFD is accepted (possibly for 5.2) we won't enable any more features. I'm not a fan of wild speculations and grand schemes that then don't come to fruition. :) Right now it's about focussing on somewhat cleanly covering the basics. Coming to a consensus there was hard enough. We have no intention in making this more complex right now as it needs to be. Christian