Re: [RFC PATCH] Implement /proc/pid/kill

From: Eric W. Biederman
Date: Wed Oct 31 2018 - 01:01:40 EST

Christian Brauner <christian.brauner@xxxxxxxxxxxxx> writes:

> On Tue, Oct 30, 2018 at 12:12 PM Daniel Colascione <dancol@xxxxxxxxxx> wrote:
>> On Tue, Oct 30, 2018 at 11:04 AM, Christian Brauner
>> <christian.brauner@xxxxxxxxxxxxx> wrote:
>> > On Tue, Oct 30, 2018 at 11:48 AM Daniel Colascione <dancol@xxxxxxxxxx> wrote:
>> >>
>> >> Why not?
>> >>
>> >> Does your proposed API allow for a race-free pkill, with arbitrary
>> >> selection criteria? This capability is a good litmus test for fixing
>> >> the long-standing Unix process API issues.
>> >
>> > You'd have a handle on the process with an fd so yes, it would be.
>> Thanks. That's good to hear.
>> Any idea on the timetable for this proposal? I'm open to lots of
>> alternative technical approaches, but I don't want this capability to
>> languish for a long time.
> Latest end of year likely sooner depending on the feedback I'm getting
> during LPC.

Frankly. If you want a race free fork variant probably the easiest
thing to do is to return a open copy of the proc directory entry. Wrapped
in a bind mount so that you can't see beyond that directory in proc.

My only concern would be if a vfsmount per process would be too heavy for such a use.