linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Michael Tirado <mtirado418@gmail.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: pidfd design
Date: Mon, 25 Mar 2019 10:45:29 -0700	[thread overview]
Message-ID: <CAHk-=wgmKZm-fESEiLq_W37sKpqCY89nQkPNfWhvF_CQ1ANgcw@mail.gmail.com> (raw)
In-Reply-To: <CAMkWEXPsikD8uvMSxQH=RUx-qPHO1UBtKgXsg=p9hY_bD2u2ow@mail.gmail.com>

On Fri, Mar 22, 2019 at 11:34 AM Michael Tirado <mtirado418@gmail.com> wrote:
>
> On Wed, Mar 20, 2019 at 8:08 PM Alexey Dobriyan <adobriyan@gmail.com> 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

  reply	other threads:[~2019-03-25 17:45 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 20:07 pidfd design Alexey Dobriyan
2019-03-20 20:14 ` Daniel Colascione
2019-03-20 20:39   ` Alexey Dobriyan
2019-03-20 20:47     ` Christian Brauner
2019-03-20 20:50       ` Daniel Colascione
2019-03-20 21:00         ` Christian Brauner
2019-03-22 14:04 ` Michael Tirado
2019-03-25 17:45   ` Linus Torvalds [this message]
2019-03-25 16:14     ` Michael Tirado
2019-03-25 20:45     ` Christian Brauner
2019-03-25 18:50   ` Christian Brauner
  -- strict thread matches above, loose matches on Subject: below --
2019-03-16 18:57 [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android Christian Brauner
2019-03-16 19:37 ` Suren Baghdasaryan
2019-03-17  1:53   ` Joel Fernandes
2019-03-17 11:42     ` Christian Brauner
2019-03-17 15:40       ` Daniel Colascione
2019-03-18  0:29         ` Christian Brauner
2019-03-18 23:50           ` Joel Fernandes
2019-03-19 22:14             ` Christian Brauner
2019-03-19 22:48               ` Daniel Colascione
2019-03-19 23:10                 ` Christian Brauner
2019-03-20  1:52                   ` Joel Fernandes
2019-03-20  2:42                     ` pidfd design Daniel Colascione
2019-03-20  3:59                       ` Christian Brauner
2019-03-20  7:02                         ` Daniel Colascione
2019-03-20 11:33                           ` Joel Fernandes
2019-03-20 18:26                             ` Christian Brauner
2019-03-20 18:38                               ` Daniel Colascione
2019-03-20 18:51                                 ` Christian Brauner
2019-03-20 18:58                                   ` Andy Lutomirski
2019-03-20 19:14                                     ` Christian Brauner
2019-03-20 19:40                                       ` Daniel Colascione
2019-03-21 17:02                                         ` Andy Lutomirski
2019-03-25 20:13                                           ` Jann Horn
2019-03-25 20:23                                             ` Daniel Colascione
2019-03-25 23:42                                               ` Andy Lutomirski
2019-03-25 23:45                                                 ` Christian Brauner
2019-03-26  0:00                                                   ` Andy Lutomirski
2019-03-26  0:12                                                     ` Christian Brauner
2019-03-26  0:24                                                       ` Andy Lutomirski
2019-03-28  9:21                                                         ` Christian Brauner
2019-03-20 19:19                                   ` Joel Fernandes
2019-03-20 19:29                                   ` Daniel Colascione
2019-03-24 14:44                                     ` Serge E. Hallyn
2019-03-24 18:48                                       ` Joel Fernandes
2019-03-20 19:11                               ` Joel Fernandes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHk-=wgmKZm-fESEiLq_W37sKpqCY89nQkPNfWhvF_CQ1ANgcw@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtirado418@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).