Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp51725img; Wed, 20 Mar 2019 13:52:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7LIMXf7HmMWtp73PAzqH2Ja5IQNvFIQ8SwQkJcNa9bQUAJ97LCzKGlW6SS2tdObrC1O9h X-Received: by 2002:a65:6546:: with SMTP id a6mr9776846pgw.296.1553115130393; Wed, 20 Mar 2019 13:52:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553115130; cv=none; d=google.com; s=arc-20160816; b=GyzVgyemhRUA3yFI4HasbruT4jG+IlCVg1htuBmEoV/nR0UAmdbCE4fURQp3e9IeV6 1TMho6pjazDGlGEjUb2OomOdzlocHKd8cDtI0BzmD3kD7lDttjmLFZfQs1PoNWDqnguk wUrOUsXlt4ESL5e7MHxCugL8zM9W30eJI4Nhh6vLLAr2bb89gVXVTyMZQvQc6lq1gzBh gLcRR0pxe7VSKDbYrdXsFk6KX8h2Eo9PDexDPRcwbr09buDa7Sq8/Q0HTwPzaEzvCzcx MOqjkyej/ISABsiprlkTp4IoVB06diSE948um8/qlGBtkhfzMTqw+6zKP+5ULQHMezfh OfDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=kfgLy63hoRDNRDUjULbayuRyfYKtW57uHtlKIJTl//E=; b=ZxHCku6bS1Kc+fCjWvmwbjTEZdiTvStRKASnEsf+X10jK0cARbXrDKU0i7aISY/VtI xKHc9NP9GZGWDcIBMVKvy2YUeSZ6Yjh4zQp9KAg6fdB7CsGtTvWffxQPz/ZAG6k6FBBr JfDWIVDD6kpP2Cr6M5tWkhpQG/8iAbMO7K3D+yfGFmnKYUwByYVn0ycjDavJ2GXKIlEx pXkoGhTXTZcrBadBDnt4sFhXQYo6O3Y/wCqTPabCwF9HlT/lj/UZl0vvH4gTC2UKmiAH 4GFKKgfjXi1EHCVRFbzDwoEBtOOvR+3dvcjcx4T0o9E7TErNvmeHT6iiO0az4YflCwtY yVCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lZxWmoxA; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 16si2562621pga.351.2019.03.20.13.51.54; Wed, 20 Mar 2019 13:52: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; dkim=pass header.i=@google.com header.s=20161025 header.b=lZxWmoxA; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727382AbfCTUu4 (ORCPT + 99 others); Wed, 20 Mar 2019 16:50:56 -0400 Received: from mail-vs1-f67.google.com ([209.85.217.67]:38424 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726067AbfCTUu4 (ORCPT ); Wed, 20 Mar 2019 16:50:56 -0400 Received: by mail-vs1-f67.google.com with SMTP id h132so2394575vsd.5 for ; Wed, 20 Mar 2019 13:50:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kfgLy63hoRDNRDUjULbayuRyfYKtW57uHtlKIJTl//E=; b=lZxWmoxA/ClLsFNZAFe06hIbbsd4Pxd88WspBVdP2qO0IUyi1AXG4/e8RiRWkf+m1p Y4BpEGsA+jdfp+qzsNUcCPqZlvOUU7CJ0z6raCtCK5zkgdLxBRRG5HTEMyV6DkwzU2VK z14gn8Cy/ahYIcGqKHd4ZPSTWq5VZtl9wGU4kHZ678529ltQJ6G7YSwgDJ6ASrZnOel0 xuLyktFJitNJgHCczNnW4N25LVwhJlzvFcPXbSzYjr51/8zHc0StM4ybTByShE57o+XT t3aIG3K6vveO5pIeUzxMu0aP9O9Du6sR2hyj9s8RORVuZrvFTClQS+cBiadlb35WkDIJ mKpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kfgLy63hoRDNRDUjULbayuRyfYKtW57uHtlKIJTl//E=; b=rP9efau5NqrMqFrXXIwviqwVOZpZIM9FEhk5lHYCJxJR0ahcm6qnoktcE+YkBXWyBl NDSR4e6/+DjCoUjmT1/fvB1uzj9gwcupyql7lQJolTxlsLaONPEiEhlJocob61q73yhx mDWZ7UdFxAN8uxSvGSmOBZw8XQr4x719/cbkQVhgUuvu587BGedxI5buPq9kbGyYd2vK zYAI/sfaX7u67a0uDrbwD5GPx20ip2JPqNNCyU5Cpembl14o731ZEnug5EDZd2cwmUS6 eZ1E8Es5OQdGWzICc7zZEroeLfudh6k1bgLPyX8thLDCee52lIEpNEPZA8d+5O7aM3Kb JDrA== X-Gm-Message-State: APjAAAXFKca7aNN2ik1Rhx5P601iHtL8C+Tf71U/RAaS7dZMQUuWeWgY Gm/fmNRHxFEAnFNt05AB+njbhy/mdSlUTaaAZk7gx+CGfGk= X-Received: by 2002:a67:fa8c:: with SMTP id f12mr6204401vsq.171.1553115054403; Wed, 20 Mar 2019 13:50:54 -0700 (PDT) MIME-Version: 1.0 References: <20190320200702.GA27111@avx2> <20190320203910.GA2842@avx2> <20190320204736.x4p5m7gxz6rbxlo3@brauner.io> In-Reply-To: <20190320204736.x4p5m7gxz6rbxlo3@brauner.io> From: Daniel Colascione Date: Wed, 20 Mar 2019 13:50:43 -0700 Message-ID: Subject: Re: pidfd design To: Christian Brauner Cc: Alexey Dobriyan , linux-kernel , Joel Fernandes , Andy Lutomirski Content-Type: text/plain; charset="UTF-8" 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 1:47 PM Christian Brauner wrote: > > 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. Then again: how do you propose fetching process metadata? If you adopt a stance that nothing can use procfs and simultaneously adopt a stance that we don't want to duplicate all the decades of metadata interfaces in /proc/pid (which are useful, not "crap"), then the overall result is that we just won't make any progress at all. There's nothing wrong with taking a dependency on procfs: procfs is how we talk about processes. It's completely unreasonable to say "no, you can't use the old thing" and also "no, we can't add a new thing that would duplicate the old thing".