Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp50672img; Wed, 20 Mar 2019 13:50:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwk+9chr58VpzldgYTOajz8LxE58O6xhfEXe5/BPL83x6Ppu1owD1O3Mr+9PnErou90OKZj X-Received: by 2002:a63:ef05:: with SMTP id u5mr9333974pgh.177.1553115024881; Wed, 20 Mar 2019 13:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553115024; cv=none; d=google.com; s=arc-20160816; b=Zj4FKHAhjHZZTKj89RdphGpgXfjzdAlgjv9L8DeD7JyjwUkb9Cq13RbeFv9y4h/JEV pamVKr2qZl0GqICCs4L6EO6oNtqX2jJp1GJlzVZ8pYP+Do2ucVe4quG+dK97Su/KOqWh FpzNlsP9J2BlW+KZ3g4FTMhDHGPG3eDO91FRBoEOtKgXK1IHQTdzavXQFG+D0etBbjNR GecqyvpvrNHfSsZhtDk2eCYfRbCUIao2IBiekhNTkESCPuC5mHs/iYmX5eW+qclZQSOR RkgQpfFd0G+o/gL4jl7BEjFqsCuV3xxoWUvR2BKieh4kv9ESZc5zZteALxKArf3BkDxK rSeQ== 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=LXbyAZLkt2VB7jEtAgbet0eHFze4KgeF8lZT5KLgas4=; b=gnkiHhHYWImKk8dPm0O0J+4y3hkdLiL9BsfYwhBnZWWKYmC57E6r3uwN5JkJojrhvL fMk3e+9+oQixkoppp/HvV4w/lxkaDKZaOlULGVycZ7AAbSxsnTg967nmnIHdhBx/BBTB o4m8USehICAGr9YwuBMzf5xxKKQDoOTHlHWI38tQw5qkY/8cF97BzWSTxPHTH4gEnLzI BVBpDXEixDXr/hcK7laIPB3j3zpp0Q/S/efd/2AzC4D0Z7giNgvu0VqT+JqdRxCmILj/ 9sf0crPoEn6Dul8D8WUwjYmfsM+rSOTd2RHdbWtgE/7UdasuEAGkaPEF4yOxTh9fAyqY oEKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=W3ljHHUN; 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 q6si2647016pll.130.2019.03.20.13.50.09; Wed, 20 Mar 2019 13:50:24 -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=W3ljHHUN; 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 S1726742AbfCTUrl (ORCPT + 99 others); Wed, 20 Mar 2019 16:47:41 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:44691 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726006AbfCTUrl (ORCPT ); Wed, 20 Mar 2019 16:47:41 -0400 Received: by mail-pf1-f196.google.com with SMTP id a3so2742618pff.11 for ; Wed, 20 Mar 2019 13:47:40 -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=LXbyAZLkt2VB7jEtAgbet0eHFze4KgeF8lZT5KLgas4=; b=W3ljHHUNBtexEeUTuAfjX4c2iyf0mCRtzbgvCMYupV1rEwSxgpeZuZEhIlmd64hOjM pppP/hLU+trzbXusLZQKDE2DbzxWiRYmzUaMsX4hi+7VBxNKFlNCk0V+l0zH4Lx5zqcj fB7oenB78BR8tAE01YAKxEl85X3XD3/RVK2q7ervBvqC4yY6ByZfsyIhT1XaMULQP0Nq yE3rQEiWauStljy3MaAgge+3M2QZpqfhMI+cRVEkmIZRVOM9upsJ3T0uTARbtseybBdn 1x1rGTHOvYD4P9yMT+bWoEKqlCNAfnZ48uZicqW4+QrxPNbWd++taGAt8EuEAG031bbM NLfA== 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=LXbyAZLkt2VB7jEtAgbet0eHFze4KgeF8lZT5KLgas4=; b=fB71/KtH0/mBin5k93thMywWEQiAJ0gAggiXOZuBXzlzr57T+Wq8y1sXuDj2yoxhfV 8bOsH2C0dRThbchhCmdBmEz+BrZoC1U2Sldpvo+NdFA6giH4Wc1WvE+/RkIQAaKb1Q+a 9X64e/Zaqp5O3Z+zqtWmrrA49xSiabBt1uvtfJh4sboBkLWTRUGgSfiHe6rXtHxXD/L5 LMNWQ0jNIMVdL5wvszlwYjj9EcTSThqORMT7ST8l5dRcyS6bHliG3Q9g1G76NRd8fOzs Pa3k88eAcLPtcNaXZTa5JAvC44BRRYpk2xdy7sUcaRkbJ0bWI0/7Ofq/zzxyur5AOJIM 4T+w== X-Gm-Message-State: APjAAAWOf9siCi4hEaUlvEcKofy0sO/D/RmdnSh53NNLh2cg+wbgdm81 kG6egKmmEMPmV9xI93j58LBL8A== X-Received: by 2002:a17:902:a716:: with SMTP id w22mr10321778plq.280.1553114860028; Wed, 20 Mar 2019 13:47:40 -0700 (PDT) Received: from brauner.io ([12.25.160.29]) by smtp.gmail.com with ESMTPSA id k22sm3808630pfa.84.2019.03.20.13.47.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Mar 2019 13:47:39 -0700 (PDT) Date: Wed, 20 Mar 2019 21:47:37 +0100 From: Christian Brauner To: Alexey Dobriyan Cc: Daniel Colascione , linux-kernel , Joel Fernandes , Andy Lutomirski Subject: Re: pidfd design Message-ID: <20190320204736.x4p5m7gxz6rbxlo3@brauner.io> References: <20190320200702.GA27111@avx2> <20190320203910.GA2842@avx2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190320203910.GA2842@avx2> 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, Mar 20, 2019 at 11:39:10PM +0300, Alexey Dobriyan wrote: > On Wed, Mar 20, 2019 at 01:14:01PM -0700, Daniel Colascione wrote: > > On Wed, Mar 20, 2019 at 1:07 PM Alexey Dobriyan wrote: > > > > What would be your opinion to having a > > > > /proc//handle > > > > file instead of having a dirfd. > > > > > > This is even worse than depending on PROC_FS. Just for the dependency > > > pidfd code should be backed out immediately. Forget about /proc. > > > > We already have pidfds, and we've had them since /proc was added ages > > ago. > > New pidfd code (or whatever the name) should NOT depend on /proc and > should not interact with VFS at all at any point (other than probably > being a descriptor on a fake filesystem). The reason is that /proc is > full of crap and you don't want to spill that into new and hopefully > properly designed part of new code. Yes, I agree. That's why I was thinking that translate_pid() is a good candidate to provide that decoupling.