[lkml]   [2019]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 2/5] clone: add CLONE_PIDFD
On April 18, 2019 4:10:20 PM GMT+02:00, Oleg Nesterov <> wrote:
>On 04/18, Christian Brauner wrote:
>> On Thu, Apr 18, 2019 at 03:12:07PM +0200, Oleg Nesterov wrote:
>> > Should we allow CLONE_THREAD | CLONE_PIDFD ?
>> I think so, yes. I have thought about this.
>OK, I won't insist. But let me explain why did I ask.
>> Yes, due to CLONE_FILES |
>> CLONE_VM you'd necessarily hand the pidfd to the child but threads
>> no security boundary in the first place.
>No, no, I am not not worried about security. CLONE_PARENT | CLONE_PIDFD
>looks more problematic to me, but I see nothing dangerous
>I agree that CLONE_THREAD | CLONE_PIDFD may be usefule, but I am not
>we should allow this from the very begining, until we have a "real"
>IIUC, we are going to make it pollable soon. OK, but
>(which should be turned into pidfd_poll) simply can't work if
>pid_task() is
>not a group leader. poll(pidfd) will hang forever if pidfd was created
>Sure, we can (should?) improve pidfd_poll() but this will need more
>changes in the core kernel code. Do we really need/want this? Right now
>is not clear to me. Instead, we can simply disallow
>until we decide that yes, we want to poll sub-threads.

If you think that makes the polling work simpler for Joel then for sure.
And yes, I have argued for "disable until someone needs it" often before so I can't really argue the other way around here. :)
I'll send an updated version soon.


>But again, I am fine with CLONE_THREAD | CLONE_PIDFD.

 \ /
  Last update: 2019-04-18 16:15    [W:0.059 / U:31.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site