Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp408776yba; Mon, 1 Apr 2019 08:44:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBDDhdZDddBraS8PBhpA4kLvm6mKgl1Ulw9BBhxRbxa5z2PlwfbBnF6sm/hwa5eby+kWQ/ X-Received: by 2002:a17:902:54f:: with SMTP id 73mr65524190plf.210.1554133450030; Mon, 01 Apr 2019 08:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554133450; cv=none; d=google.com; s=arc-20160816; b=wbts8BKYMa0mBTuD75QQZQsyFq/YBTCtrYcGcpWEcNiu7q0BgaliojdKLJmQppcQhX JIxLNN2Vjj0m3F1pygoHueAckiS1Bry6dmG2efkG+87JrQDmxvWgMzOFiDx2o5fQX878 4c4e9gpupY7cQZWdZQoCazg7QHknLqTzUiYvdABI8r+gN2Fwo6gvuR1GXaQ8Lzhka+QK lWZj8YUkvHEjKDnnWDzsRGS3rV26+XAt2QLu5wUJfG4JLSawZjnOxqVFLS0jwEpiUsEq w2LynGTH2x3II+sTlwpGvOpWhd87IvPGyj1pVF8ANvD8BTsBJPYbvceRpI5OQoghNWTp Sjbw== 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=KOW3gcj0uVZsBKtJ1kk1jNQorwoq58Na1xgkJ5fJwr8=; b=dplQpXjdS0dPE+8JCZ6xzR5lW3S2vNohv8NqaHg14p6bqXp8ttgR6xLmi/aGA80uPr oifVkU8AwiWxyn7eKBmoJr8BPenmVDYljP27aUi/PXMlT+L4UY+uqPPYzxpWAE/F1MAL LvBVbhBh+XH+CMTBOU+yYbsgYmcyxAg4JJlPc71ilGGPO7xs8ILCtMqcrwHinZG0Ia8Y PS34rUcT5X7Qym/aKL4cpRvyLI+YGgnmwJuawFXlrohs7Kdwj4ZtrLiwOXa2JN2qVgrz q6DydxWqgoR7cdtK3aQ/kRHB7fD9cE4VPOXrX2DMZkvZsPqrkeyjd0zQOAbu5xmREqLg JO/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=IKLQM78L; 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 w3si8835908plp.35.2019.04.01.08.43.53; Mon, 01 Apr 2019 08:44: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=@linux-foundation.org header.s=google header.b=IKLQM78L; 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 S1728565AbfDAPmA (ORCPT + 99 others); Mon, 1 Apr 2019 11:42:00 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:38225 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726617AbfDAPmA (ORCPT ); Mon, 1 Apr 2019 11:42:00 -0400 Received: by mail-lf1-f68.google.com with SMTP id a6so6661150lfl.5 for ; Mon, 01 Apr 2019 08:41:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KOW3gcj0uVZsBKtJ1kk1jNQorwoq58Na1xgkJ5fJwr8=; b=IKLQM78LYMrHE2ryWjCD67ieOLyLRl+qQ7SoWH5RCDaqGhanzR41HN+G8WzqWJoUw9 HTmyXMlnZcS4boxznsdRMFAq9WlqeDDKFQEnijI+ivyPrYsDX5Rin2yywSDcbZdMhyX1 /4nTwk+H1MX5GSuIsUoyL4+a2a16nQTbUZXBo= 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=KOW3gcj0uVZsBKtJ1kk1jNQorwoq58Na1xgkJ5fJwr8=; b=fManrTyldvtovwYlrmVr1UGSZWC8wmZI7olyR+vdaY79q4s8j9zy2tXFPp/jjmoqq2 U0lvZCI7qij7K40ZD3Du88VhY+EcQkKY589fTf1bVdwheAvSzrVxD7YzKvhbYbIIdKiX r0f5C9JYh79eIikAqL+lXRMD3m5W7UWnUczUJ/HN4mfpFaAP8RukXILmX+TPDRGgkoEh QKZLvG85Sk9msYfhLuJgd76b1/zqmqssh8KsSiQ7vzljeBmNlgg4J3jxCrHkTrQ+SUKR rTWNIcJN9aAMqIFzh3IYu2TCZALO+s8paGfyTJGn0sYyYTjBJv7M/26+LZ2rZUNu5kwr dBaw== X-Gm-Message-State: APjAAAWkVwqpHBxcoFQIRs08fK/M5X42CkY0ESGb+z3pyeRrmomO3SEM NqXGhaQ9ju+u2VMjfxb0eFniROz7b/Q= X-Received: by 2002:a19:c314:: with SMTP id t20mr33097723lff.114.1554133318441; Mon, 01 Apr 2019 08:41:58 -0700 (PDT) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com. [209.85.167.44]) by smtp.gmail.com with ESMTPSA id 7sm2419510lju.27.2019.04.01.08.41.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Apr 2019 08:41:58 -0700 (PDT) Received: by mail-lf1-f44.google.com with SMTP id a6so6661100lfl.5 for ; Mon, 01 Apr 2019 08:41:58 -0700 (PDT) X-Received: by 2002:ac2:44c3:: with SMTP id d3mr132573lfm.14.1554133002233; Mon, 01 Apr 2019 08:36:42 -0700 (PDT) MIME-Version: 1.0 References: <20190330171215.3yrfxwodstmgzmxy@brauner.io> <132107F4-F56B-4D6E-9E00-A6F7C092E6BD@amacapital.net> <20190331211041.vht7dnqg4e4bilr2@brauner.io> <18C7FCB9-2CBA-4237-94BB-9C4395A2106B@amacapital.net> <20190401114059.7gdsvcqyoz2o5bbz@yavin> In-Reply-To: <20190401114059.7gdsvcqyoz2o5bbz@yavin> From: Linus Torvalds Date: Mon, 1 Apr 2019 08:36:26 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/5] pid: add pidfd_open() To: Aleksa Sarai Cc: Andy Lutomirski , Christian Brauner , Daniel Colascione , Jann Horn , Andrew Lutomirski , David Howells , "Serge E. Hallyn" , Linux API , Linux List Kernel Mailing , Arnd Bergmann , "Eric W. Biederman" , Konstantin Khlebnikov , Kees Cook , Alexey Dobriyan , Thomas Gleixner , Michael Kerrisk-manpages , Jonathan Kowalski , "Dmitry V. Levin" , Andrew Morton , Oleg Nesterov , Nagarathnam Muthusamy , Al Viro , Joel Fernandes 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 Mon, Apr 1, 2019 at 4:41 AM Aleksa Sarai wrote: > > Eric pitched a procfs2 which would *just* be the PIDs some time ago (in > an attempt to make it possible one day to mount /proc inside a container > without adding a bunch of masked paths), though it was just an idea and > I don't know if he ever had a patch for it. I wonder if we really want a fill procfs2, or maybe we could just make the pidfd readable (yes, it's a directory file descriptor, but we could allow reading). What are the *actual* use cases for opening /proc files through it? If it's really just for a small subset that android wants to do this (getting basic process state like "running" etc), rather than anything else, then we could skip the whole /proc linking entirely and go the other way instead (ie open_pidfd() would get that limited IO model, and we could make the /proc directory node get the same limited IO model). Linus