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

2018-11-11 Thread Eric W. Biederman
David Laight writes: > From: Daniel Colascione >> Sent: 31 October 2018 19:33 > ... >> You can't do it today with kill. The idea that keeping a open file >> descriptor to a /proc/pid or a file within it prevents PID reuse is >> widespread, but incorrect. > > Is there a real good reason why that

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

2018-11-11 Thread Eric W. Biederman
David Laight writes: > From: Daniel Colascione >> Sent: 31 October 2018 19:33 > ... >> You can't do it today with kill. The idea that keeping a open file >> descriptor to a /proc/pid or a file within it prevents PID reuse is >> widespread, but incorrect. > > Is there a real good reason why that

RE: [PATCH v3] Implement /proc/pid/kill

2018-11-01 Thread David Laight
From: Daniel Colascione > Sent: 31 October 2018 19:33 ... > You can't do it today with kill. The idea that keeping a open file > descriptor to a /proc/pid or a file within it prevents PID reuse is > widespread, but incorrect. Is there a real good reason why that shouldn't be the case? ie Holding

RE: [PATCH v3] Implement /proc/pid/kill

2018-11-01 Thread David Laight
From: Daniel Colascione > Sent: 31 October 2018 19:33 ... > You can't do it today with kill. The idea that keeping a open file > descriptor to a /proc/pid or a file within it prevents PID reuse is > widespread, but incorrect. Is there a real good reason why that shouldn't be the case? ie Holding

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

2018-10-31 Thread Tycho Andersen
On Wed, Oct 31, 2018 at 07:33:06PM +, Daniel Colascione wrote: > On Wed, Oct 31, 2018 at 6:17 PM, Tycho Andersen wrote: > > On Wed, Oct 31, 2018 at 06:00:49PM +, Daniel Colascione wrote: > >> On Wed, Oct 31, 2018 at 5:54 PM, Tycho Andersen wrote: > >> > Why not just use an ioctl() like

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

2018-10-31 Thread Tycho Andersen
On Wed, Oct 31, 2018 at 07:33:06PM +, Daniel Colascione wrote: > On Wed, Oct 31, 2018 at 6:17 PM, Tycho Andersen wrote: > > On Wed, Oct 31, 2018 at 06:00:49PM +, Daniel Colascione wrote: > >> On Wed, Oct 31, 2018 at 5:54 PM, Tycho Andersen wrote: > >> > Why not just use an ioctl() like

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

2018-10-31 Thread Daniel Colascione
On Wed, Oct 31, 2018 at 6:17 PM, Tycho Andersen wrote: > On Wed, Oct 31, 2018 at 06:00:49PM +, Daniel Colascione wrote: >> On Wed, Oct 31, 2018 at 5:54 PM, Tycho Andersen wrote: >> > Why not just use an ioctl() like Jann suggested instead of this big >> > security check? Then we avoid the

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

2018-10-31 Thread Daniel Colascione
On Wed, Oct 31, 2018 at 6:17 PM, Tycho Andersen wrote: > On Wed, Oct 31, 2018 at 06:00:49PM +, Daniel Colascione wrote: >> On Wed, Oct 31, 2018 at 5:54 PM, Tycho Andersen wrote: >> > Why not just use an ioctl() like Jann suggested instead of this big >> > security check? Then we avoid the

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

2018-10-31 Thread Tycho Andersen
On Wed, Oct 31, 2018 at 06:00:49PM +, Daniel Colascione wrote: > On Wed, Oct 31, 2018 at 5:54 PM, Tycho Andersen wrote: > > Why not just use an ioctl() like Jann suggested instead of this big > > security check? Then we avoid the whole setuid writer thing entirely, > > Don't you think a

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

2018-10-31 Thread Tycho Andersen
On Wed, Oct 31, 2018 at 06:00:49PM +, Daniel Colascione wrote: > On Wed, Oct 31, 2018 at 5:54 PM, Tycho Andersen wrote: > > Why not just use an ioctl() like Jann suggested instead of this big > > security check? Then we avoid the whole setuid writer thing entirely, > > Don't you think a

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

2018-10-31 Thread Daniel Colascione
On Wed, Oct 31, 2018 at 5:54 PM, Tycho Andersen wrote: > Why not just use an ioctl() like Jann suggested instead of this big > security check? Then we avoid the whole setuid writer thing entirely, Don't you think a system call would be better than a new ioctl? With either an ioctl or a new

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

2018-10-31 Thread Daniel Colascione
On Wed, Oct 31, 2018 at 5:54 PM, Tycho Andersen wrote: > Why not just use an ioctl() like Jann suggested instead of this big > security check? Then we avoid the whole setuid writer thing entirely, Don't you think a system call would be better than a new ioctl? With either an ioctl or a new

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

2018-10-31 Thread Tycho Andersen
On Wed, Oct 31, 2018 at 03:59:12PM +, Daniel Colascione wrote: > Add a simple proc-based kill interface. To use /proc/pid/kill, just > write the signal number in base-10 ASCII to the kill file of the > process to be killed: for example, 'echo 9 > /proc/$$/kill'. > > Semantically,

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

2018-10-31 Thread Tycho Andersen
On Wed, Oct 31, 2018 at 03:59:12PM +, Daniel Colascione wrote: > Add a simple proc-based kill interface. To use /proc/pid/kill, just > write the signal number in base-10 ASCII to the kill file of the > process to be killed: for example, 'echo 9 > /proc/$$/kill'. > > Semantically,