Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3462456img; Mon, 25 Mar 2019 10:47:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSIx6OMZ7zyPF6mli8/X3G1xXmLLX9UE2gbAQddjfJ66M7wnXEdRTAwIqS8EWH6aflZDXj X-Received: by 2002:a17:902:b20e:: with SMTP id t14mr25981846plr.97.1553536021475; Mon, 25 Mar 2019 10:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553536021; cv=none; d=google.com; s=arc-20160816; b=s/wXpHCrFXbKTPkqWQJPv61BsplOQFhZsFZ5H32dhcWi09gGAzGkbaZxGD3IqQPcXu X+iiSzX6UGvhGL2YseusbjWE8vdaWDkP421G+b2HFbvhvLz5Yq+/sh7YExcYszkmTYQL iSViStpwwF4F72RCC8TI8KBvNKgPMkE6A4gHSgMruYlrFwsZD8stsZc18gW5MiAoOVdD ylilHohUZlSHhN9wyXUu/2BVm6IZlmXgSvrYb2hW5Im6UtBO7h96H3hXAOqofF/6zQoY A5KzHVO1huLQHbwx9e7nG9S7vlrcYTimuDirNgt+bNi7nnKiWBlAN0FkKDUcn5EOIs8l PO7g== 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=qRe2oWrFowjPDwMQ0XzV+doqxVqQ9V1/hj0R7uFWrcE=; b=wyAUfqEP/bYKHVf/9jjwXK8GFxYPKCmD159NwkDJyvdv4cQFFhj/5MwT2Xyi+QHPGR N9mOsehawJpEMQn2m6OhriI2BtwRGEOWMBZzLln5zF83+7Qe5rTrqsazAZzdBNt8Dnow 2421MYag6dm8PuEBZ0yUDR8uBmozPGbsSL+aawWY1PsRigvt95flNuxaTlvRDEnyFvcG SXvC4nE+WjA9ieR/oPBlc15ysSpyRUa6rmt5/uFceW687UiDM5q9UYNAcH3IIkTO56ST X1X3RWdKEUNxJEQZY6+0mXZYGhW+G8HSPAiuKF29Q2yEvuBHElrmkRxJ72F94KlClw0O N4dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FjpUfbuG; 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 91si14815143pla.14.2019.03.25.10.46.46; Mon, 25 Mar 2019 10:47:01 -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=FjpUfbuG; 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 S1729927AbfCYRpu (ORCPT + 99 others); Mon, 25 Mar 2019 13:45:50 -0400 Received: from mail-lj1-f181.google.com ([209.85.208.181]:36895 "EHLO mail-lj1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729774AbfCYRpt (ORCPT ); Mon, 25 Mar 2019 13:45:49 -0400 Received: by mail-lj1-f181.google.com with SMTP id v13so8661821ljk.4 for ; Mon, 25 Mar 2019 10:45:48 -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=qRe2oWrFowjPDwMQ0XzV+doqxVqQ9V1/hj0R7uFWrcE=; b=FjpUfbuGF9Ba2aish+S9SNuMMwnK1poJo8Oj81SbdIah901GHv7zVQK5hLtkaPkRcz kHbeSQZWCXO9w+Q4lLrdROL+JbH31HczbwfF5egbZ6RycWE+sfr4JXd2bG5kcS1jyjeY NtrrLqyPNgcaSNoQAMQb2weh1FqMVW1iPa45s= 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=qRe2oWrFowjPDwMQ0XzV+doqxVqQ9V1/hj0R7uFWrcE=; b=Mxg03vc63FGYOK7KFmz/G1P52S6tKkKP9hYx2V1MemleiSB/nMft/lk0TF5gncsctl 6hpJtkdlwnks7GFGAAH8AVtFxHuZTTbvPSoH2tr8dh//Jgt+IPjZKNSvJTh8cTdPzHjM HJsFgm64h2hfJKUQdE9nlyxUJ+IcFsS2z27LhiQsWYg5Fb+t8h1jwfmUe6u+GlTGljT9 GQ3ond+nacCH1FoUsWQ5dfcSWgRVrKRcNhQiCTVuV6uL0+klZArp0mByCOfB1qnmEGLd 9D/GeVCJr6CqNhA9Sdt0pLcZqsvRw0NRfsykYVecB+ET154Up79L6L9ALHjYQzGJ7ZJJ YFlg== X-Gm-Message-State: APjAAAX/PDT6jbwm6ofmACKQlxx/0QTIEOIqd68+dYNARmDcuCqwXR3r p27s+15q3CFcTMIrYFH7gSMq2MDow+M= X-Received: by 2002:a2e:81c6:: with SMTP id s6mr13759481ljg.56.1553535947305; Mon, 25 Mar 2019 10:45:47 -0700 (PDT) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id s24sm2133677ljs.30.2019.03.25.10.45.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Mar 2019 10:45:46 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id v22so8634475lje.9 for ; Mon, 25 Mar 2019 10:45:46 -0700 (PDT) X-Received: by 2002:a2e:3e0e:: with SMTP id l14mr7533960lja.125.1553535945828; Mon, 25 Mar 2019 10:45:45 -0700 (PDT) MIME-Version: 1.0 References: <20190320200702.GA27111@avx2> In-Reply-To: From: Linus Torvalds Date: Mon, 25 Mar 2019 10:45:29 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: pidfd design To: Michael Tirado Cc: Alexey Dobriyan , LKML 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 Fri, Mar 22, 2019 at 11:34 AM Michael Tirado wrote: > > On Wed, Mar 20, 2019 at 8:08 PM Alexey Dobriyan wrote: > > > > pidfd code should be backed out immediately. Forget about /proc. > > Seems like Torvalds just merges this sort of "stuff" without reading > it now, or there's something that auto accepted pull request to RC tree? There is no auto-accept. But there also didn't seem to be any valid arguments against it, and the android people had arguments for it. Arguing against it based on "I don't like /proc" is pointless. The fact is, /proc is our system interface for a lot of things. Arguing against it based on "I worry about the _other_ non-signal-sending things that could be done with this" is also pointless. What other things? The only thing that got merged was the signalling. Now, arguing that signalling should use the open-time credentials might make sense, but this isn't read/write. You can't fool some suid program to do magic randon system calls for you, and if you can, then arguing about pidfd is kind of pointless. So the model of using a file descriptor instead of a 'pid' for signal handling is actually very unix-like. Maybe that's how pid's should have worked to begin with. Remember that whole "everything is a file" thing? Now, the fact that fork() and clone() return a pid obviously means that pidfd isn't the primary model (not to decades of just history), but that doesn't make pidfd wrong. And namespace issues etc are all also kind of irrelevant. If you open random files in /proc and randomly do pidfd_send_signal() on those, you get random results. If that worries you, then DON'T DO THAT THEN, for chrissake! That's not a sane model to begin with, but it's not the usage model for this, so it's another completely specious argument. So yes, I thought about the pidfd pull (which was why it happened at the very end of the merge window), and I found the arguments against it bad. Linus