Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp441764yba; Mon, 1 Apr 2019 09:22:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyq7Lml0KeCQF0BWqAs7OzNIOLEoB6MNiuvb82lrKrMrxQO0ubkuPYI0gOPuqdGmmrKcDdM X-Received: by 2002:a63:7117:: with SMTP id m23mr54598609pgc.271.1554135725440; Mon, 01 Apr 2019 09:22:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554135725; cv=none; d=google.com; s=arc-20160816; b=jNjkCtP8fcy7m1d2pv5XOjY8BHBj6rQBlte39qTd1Tvi2LUKqlJ2UoZSlEnmY6slN1 Ct/12tOpfiV2e1GXgrf6RyPBeg6dLF8MLItDGQqQheNINDwfZatNeq6crBaJxlQVEusL M6mOrqUJnw0lsxnaZvYOe4JzuMtgTHopgHGPlhCa5HaGk0iiICo8j1jCnToEL//ijWwD 5rme2eaxm6aEnf6/hh7JQljR+ZZApkaHBXjNzhqJqdP5dOJMiDdqf6W9ce17JmZqpn5b +aaIZVbQZ41wrZecNnBEW28qOHBEjG4OKoEOr9FtzmcSgay2TXiyIkhexdC+UFW1Bjyc f1sw== 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=PrygaNWnDryni1ERH41cFwgQicTFKFc+tb7/PeD2atM=; b=qqBvPD8yScLshnoGOXwMMkvjqxs42h1Xtyb3mUxxuXx2ui1YGLBfuy4q8nmcCWFfpQ N6jqZUEeVvrd1d8jym35aUTZuFYzfRAIZm+3hvIQacrMtlf0gGk1/gkU7qI2U2/qn4+B i+cy0mReoOkOcJB18DbIYa5I7uB64VA55i8/XDoIfpzgyfRT7ohVf2OD8U2LcxT4pf4j hMfUFUrYw+gxtOsjaw0/zG6c3gdlOc59XHrQ3aX7YpKwVzYiqDtEBeD6X0vlIx1/tyvO q7hs70Mi6Hv/qZ9Y4aX4dFYCaEXJiqscZFoAYPqAVYwhT1QNC8NI5R7Zf34x2hw4KzeG 7m6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Nc9ot7kg; 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 e4si9316130pfe.4.2019.04.01.09.21.49; Mon, 01 Apr 2019 09:22:05 -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=Nc9ot7kg; 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 S1728255AbfDAQVN (ORCPT + 99 others); Mon, 1 Apr 2019 12:21:13 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:39467 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726854AbfDAQVN (ORCPT ); Mon, 1 Apr 2019 12:21:13 -0400 Received: by mail-lj1-f196.google.com with SMTP id l7so8737673ljg.6 for ; Mon, 01 Apr 2019 09:21:11 -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=PrygaNWnDryni1ERH41cFwgQicTFKFc+tb7/PeD2atM=; b=Nc9ot7kgr5Wnyws3ntu/9l9X0TejONtrYeAwrslYZsvTM1m3DuvDkC4aJ7F9ZLzmHC oWfLq1vCH8JuktU2b0G2yFQJ/96WLOnfoUPMXt/ULaSkLYqmxfhHlVw2J7EnnxNBviwS msT4XkikFVtNmWUZhi7izBE/mmDpS9ubSD49A= 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=PrygaNWnDryni1ERH41cFwgQicTFKFc+tb7/PeD2atM=; b=DN/R/BeJvqSlddDp/xu78RIUccMBe8kq18JIwei6ZJUIdrmbRVaEA/oxx8QXzDxsSO wZywzUe7tppT+YY80whDhRAgC8cS2E5qwzZnMl8IFXdS9UzDJNNlu7M7fwtZbziN4VJr iM9oZ4hxeiAX6DBNfxuQT7LyezB0ZzQnK6+vfMoTZy6s8pbFMhGVNQPvQjCcpToFGj/y W4GuzBeVthuUzgfY3Yx14Z3G3JgF/4TVpDv/wqZ8RsiUNmP44Pv3ggc0FMtcLPChVv3x Mm7T6B8HtAPF1/VqZJrezx8Tluke8orzvVsOVo5jlLIhhPFQ3j2oy/DYiHlCw6kyND5p bARg== X-Gm-Message-State: APjAAAVe1Ot1xNbTV17mR0lvIf8RahyFB/MiIiFjAeP7QA4CbwY08C8l jxt5fKw83ELNlymHAAnBxl6LUq41g0c= X-Received: by 2002:a2e:1311:: with SMTP id 17mr14120365ljt.75.1554135670547; Mon, 01 Apr 2019 09:21:10 -0700 (PDT) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id v10sm1933556lfe.3.2019.04.01.09.21.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Apr 2019 09:21:10 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id j89so8760031ljb.1 for ; Mon, 01 Apr 2019 09:21:10 -0700 (PDT) X-Received: by 2002:a2e:8316:: with SMTP id a22mr35528351ljh.171.1554135316678; Mon, 01 Apr 2019 09:15:16 -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: From: Linus Torvalds Date: Mon, 1 Apr 2019 09:15:00 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/5] pid: add pidfd_open() To: Jonathan Kowalski Cc: Daniel Colascione , Aleksa Sarai , Andy Lutomirski , Christian Brauner , 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 , "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 9:07 AM Jonathan Kowalski wrote: > > With the POLLHUP model on a simple pidfd, you'd know when the process > you were referring to is dead (and one can map POLLPRI to dead and > POLLHUP to zombie, etc). Adding ->poll() to the pidfd should be easy. Again, it would be trivially be made to work for the directory fd you get from /proc/ too. Yeah, yeah, pollable directories are odd, but the vfs layer doesn't care about things like "is this a directory or not". It will just call the f_op->poll() method. Linus