Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-28 Thread Joey Pabalinas
On Wed, Nov 28, 2018 at 11:05:49PM +0100, Christian Brauner wrote: > On Wed, Nov 28, 2018 at 11:45:34AM -1000, Joey Pabalinas wrote: > > On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > > > + if (info) { > > > + ret = __copy_siginfo_from_user(sig, , info); > > > +

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-28 Thread Joey Pabalinas
On Wed, Nov 28, 2018 at 11:05:49PM +0100, Christian Brauner wrote: > On Wed, Nov 28, 2018 at 11:45:34AM -1000, Joey Pabalinas wrote: > > On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > > > + if (info) { > > > + ret = __copy_siginfo_from_user(sig, , info); > > > +

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-28 Thread Christian Brauner
On Wed, Nov 28, 2018 at 11:45:34AM -1000, Joey Pabalinas wrote: > On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > > + if (info) { > > + ret = __copy_siginfo_from_user(sig, , info); > > + if (unlikely(ret)) > > + goto err; > I think

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-28 Thread Christian Brauner
On Wed, Nov 28, 2018 at 11:45:34AM -1000, Joey Pabalinas wrote: > On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > > + if (info) { > > + ret = __copy_siginfo_from_user(sig, , info); > > + if (unlikely(ret)) > > + goto err; > I think

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-28 Thread Joey Pabalinas
On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > + if (info) { > + ret = __copy_siginfo_from_user(sig, , info); > + if (unlikely(ret)) > + goto err; What's the reason you don't propagate up the errors from

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-28 Thread Joey Pabalinas
On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > + if (info) { > + ret = __copy_siginfo_from_user(sig, , info); > + if (unlikely(ret)) > + goto err; What's the reason you don't propagate up the errors from

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-21 Thread Serge E. Hallyn
On Mon, Nov 19, 2018 at 03:39:54PM -0700, Tycho Andersen wrote: > On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > > > > +/** > > + * sys_procfd_signal - send a signal to a process through a process file > > + * descriptor > > + * @fd: the file descriptor

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-21 Thread Serge E. Hallyn
On Mon, Nov 19, 2018 at 03:39:54PM -0700, Tycho Andersen wrote: > On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > > > > +/** > > + * sys_procfd_signal - send a signal to a process through a process file > > + * descriptor > > + * @fd: the file descriptor

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-21 Thread Serge E. Hallyn
On Tue, Nov 20, 2018 at 08:23:43AM +1100, Aleksa Sarai wrote: > On 2018-11-20, Aleksa Sarai wrote: > > On 2018-11-19, Christian Brauner wrote: > > > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > > > On 2018-11-19, Christian Brauner wrote: > > > > > + if (info) { > > > >

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-21 Thread Serge E. Hallyn
On Tue, Nov 20, 2018 at 08:23:43AM +1100, Aleksa Sarai wrote: > On 2018-11-20, Aleksa Sarai wrote: > > On 2018-11-19, Christian Brauner wrote: > > > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > > > On 2018-11-19, Christian Brauner wrote: > > > > > + if (info) { > > > >

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-21 Thread Serge E. Hallyn
On Tue, Nov 20, 2018 at 11:31:13AM +0100, Christian Brauner wrote: > On Mon, Nov 19, 2018 at 10:59:12PM -0600, Eric W. Biederman wrote: > > Daniel Colascione writes: > > > > > On Mon, Nov 19, 2018 at 1:37 PM Christian Brauner > > > wrote: > > >> > > >> On Mon, Nov 19, 2018 at 01:26:22PM -0800,

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-21 Thread Serge E. Hallyn
On Tue, Nov 20, 2018 at 11:31:13AM +0100, Christian Brauner wrote: > On Mon, Nov 19, 2018 at 10:59:12PM -0600, Eric W. Biederman wrote: > > Daniel Colascione writes: > > > > > On Mon, Nov 19, 2018 at 1:37 PM Christian Brauner > > > wrote: > > >> > > >> On Mon, Nov 19, 2018 at 01:26:22PM -0800,

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-20 Thread Christian Brauner
On Mon, Nov 19, 2018 at 10:59:12PM -0600, Eric W. Biederman wrote: > Daniel Colascione writes: > > > On Mon, Nov 19, 2018 at 1:37 PM Christian Brauner > > wrote: > >> > >> On Mon, Nov 19, 2018 at 01:26:22PM -0800, Daniel Colascione wrote: > >> > On Mon, Nov 19, 2018 at 1:21 PM, Christian

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-20 Thread Christian Brauner
On Mon, Nov 19, 2018 at 10:59:12PM -0600, Eric W. Biederman wrote: > Daniel Colascione writes: > > > On Mon, Nov 19, 2018 at 1:37 PM Christian Brauner > > wrote: > >> > >> On Mon, Nov 19, 2018 at 01:26:22PM -0800, Daniel Colascione wrote: > >> > On Mon, Nov 19, 2018 at 1:21 PM, Christian

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Eric W. Biederman
Daniel Colascione writes: > On Mon, Nov 19, 2018 at 1:37 PM Christian Brauner > wrote: >> >> On Mon, Nov 19, 2018 at 01:26:22PM -0800, Daniel Colascione wrote: >> > On Mon, Nov 19, 2018 at 1:21 PM, Christian Brauner >> > wrote: >> > > That can be done without a loop by comparing the level

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Eric W. Biederman
Daniel Colascione writes: > On Mon, Nov 19, 2018 at 1:37 PM Christian Brauner > wrote: >> >> On Mon, Nov 19, 2018 at 01:26:22PM -0800, Daniel Colascione wrote: >> > On Mon, Nov 19, 2018 at 1:21 PM, Christian Brauner >> > wrote: >> > > That can be done without a loop by comparing the level

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Daniel Colascione
On Mon, Nov 19, 2018 at 4:28 PM Andy Lutomirski wrote: > > On Mon, Nov 19, 2018 at 3:07 PM Tycho Andersen wrote: > > > These tools also care about ioctls. Adding a system call is a pain, > > > but the solution is to make adding system calls less of a pain, not to > > > permanently make the Linux

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Daniel Colascione
On Mon, Nov 19, 2018 at 4:28 PM Andy Lutomirski wrote: > > On Mon, Nov 19, 2018 at 3:07 PM Tycho Andersen wrote: > > > These tools also care about ioctls. Adding a system call is a pain, > > > but the solution is to make adding system calls less of a pain, not to > > > permanently make the Linux

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Andy Lutomirski
On Mon, Nov 19, 2018 at 4:33 PM Christian Brauner wrote: > > On Mon, Nov 19, 2018 at 04:27:49PM -0800, Andy Lutomirski wrote: > > On Mon, Nov 19, 2018 at 3:07 PM Tycho Andersen wrote: > > > > These tools also care about ioctls. Adding a system call is a pain, > > > > but the solution is to make

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Andy Lutomirski
On Mon, Nov 19, 2018 at 4:33 PM Christian Brauner wrote: > > On Mon, Nov 19, 2018 at 04:27:49PM -0800, Andy Lutomirski wrote: > > On Mon, Nov 19, 2018 at 3:07 PM Tycho Andersen wrote: > > > > These tools also care about ioctls. Adding a system call is a pain, > > > > but the solution is to make

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Mon, Nov 19, 2018 at 04:27:49PM -0800, Andy Lutomirski wrote: > On Mon, Nov 19, 2018 at 3:07 PM Tycho Andersen wrote: > > > These tools also care about ioctls. Adding a system call is a pain, > > > but the solution is to make adding system calls less of a pain, not to > > > permanently make

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Mon, Nov 19, 2018 at 04:27:49PM -0800, Andy Lutomirski wrote: > On Mon, Nov 19, 2018 at 3:07 PM Tycho Andersen wrote: > > > These tools also care about ioctls. Adding a system call is a pain, > > > but the solution is to make adding system calls less of a pain, not to > > > permanently make

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Andy Lutomirski
On Mon, Nov 19, 2018 at 3:07 PM Tycho Andersen wrote: > > These tools also care about ioctls. Adding a system call is a pain, > > but the solution is to make adding system calls less of a pain, not to > > permanently make the Linux ABI worse. > > For user-defined values of "worse" :) > I tend to

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Andy Lutomirski
On Mon, Nov 19, 2018 at 3:07 PM Tycho Andersen wrote: > > These tools also care about ioctls. Adding a system call is a pain, > > but the solution is to make adding system calls less of a pain, not to > > permanently make the Linux ABI worse. > > For user-defined values of "worse" :) > I tend to

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Tue, Nov 20, 2018 at 07:37:58AM +0800, kbuild test robot wrote: > Hi Christian, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on linus/master] > [also build test ERROR on v4.20-rc3] > [cannot apply to next-20181119] > [if your patch is applied to the wrong

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Tue, Nov 20, 2018 at 07:37:58AM +0800, kbuild test robot wrote: > Hi Christian, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on linus/master] > [also build test ERROR on v4.20-rc3] > [cannot apply to next-20181119] > [if your patch is applied to the wrong

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread kbuild test robot
Hi Christian, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.20-rc3] [cannot apply to next-20181119] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread kbuild test robot
Hi Christian, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.20-rc3] [cannot apply to next-20181119] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread kbuild test robot
Hi Christian, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.20-rc3] [cannot apply to next-20181119] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread kbuild test robot
Hi Christian, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.20-rc3] [cannot apply to next-20181119] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Tycho Andersen
On Mon, Nov 19, 2018 at 02:49:22PM -0800, Daniel Colascione wrote: > On Mon, Nov 19, 2018 at 2:40 PM Tycho Andersen wrote: > > Can I just register an objection here that I think using a syscall > > just for this is silly? > > Yes, you can argue that the bikeshed should be ioctl-colored and not >

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Tycho Andersen
On Mon, Nov 19, 2018 at 02:49:22PM -0800, Daniel Colascione wrote: > On Mon, Nov 19, 2018 at 2:40 PM Tycho Andersen wrote: > > Can I just register an objection here that I think using a syscall > > just for this is silly? > > Yes, you can argue that the bikeshed should be ioctl-colored and not >

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Daniel Colascione
On Mon, Nov 19, 2018 at 2:40 PM Tycho Andersen wrote: > Can I just register an objection here that I think using a syscall > just for this is silly? Yes, you can argue that the bikeshed should be ioctl-colored and not syscall-colored. > My understanding is that the concern is that some code

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Daniel Colascione
On Mon, Nov 19, 2018 at 2:40 PM Tycho Andersen wrote: > Can I just register an objection here that I think using a syscall > just for this is silly? Yes, you can argue that the bikeshed should be ioctl-colored and not syscall-colored. > My understanding is that the concern is that some code

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Tycho Andersen
On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > > +/** > + * sys_procfd_signal - send a signal to a process through a process file > + * descriptor > + * @fd: the file descriptor of the process > + * @sig: signal to be sent > + * @info: the signal info

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Tycho Andersen
On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > > +/** > + * sys_procfd_signal - send a signal to a process through a process file > + * descriptor > + * @fd: the file descriptor of the process > + * @sig: signal to be sent > + * @info: the signal info

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Daniel Colascione
On Mon, Nov 19, 2018 at 1:37 PM Christian Brauner wrote: > > On Mon, Nov 19, 2018 at 01:26:22PM -0800, Daniel Colascione wrote: > > On Mon, Nov 19, 2018 at 1:21 PM, Christian Brauner > > wrote: > > > That can be done without a loop by comparing the level counter for the > > > two pid

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Daniel Colascione
On Mon, Nov 19, 2018 at 1:37 PM Christian Brauner wrote: > > On Mon, Nov 19, 2018 at 01:26:22PM -0800, Daniel Colascione wrote: > > On Mon, Nov 19, 2018 at 1:21 PM, Christian Brauner > > wrote: > > > That can be done without a loop by comparing the level counter for the > > > two pid

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Mon, Nov 19, 2018 at 01:26:22PM -0800, Daniel Colascione wrote: > On Mon, Nov 19, 2018 at 1:21 PM, Christian Brauner > wrote: > > That can be done without a loop by comparing the level counter for the > > two pid namespaces. > > > >> > >> And you can rewrite pidns_get_parent to use it. So you

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Mon, Nov 19, 2018 at 01:26:22PM -0800, Daniel Colascione wrote: > On Mon, Nov 19, 2018 at 1:21 PM, Christian Brauner > wrote: > > That can be done without a loop by comparing the level counter for the > > two pid namespaces. > > > >> > >> And you can rewrite pidns_get_parent to use it. So you

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Aleksa Sarai
On 2018-11-19, Daniel Colascione wrote: > On Mon, Nov 19, 2018 at 1:21 PM, Christian Brauner > wrote: > > That can be done without a loop by comparing the level counter for the > > two pid namespaces. > > > >> > >> And you can rewrite pidns_get_parent to use it. So you would instead be > >>

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Aleksa Sarai
On 2018-11-19, Daniel Colascione wrote: > On Mon, Nov 19, 2018 at 1:21 PM, Christian Brauner > wrote: > > That can be done without a loop by comparing the level counter for the > > two pid namespaces. > > > >> > >> And you can rewrite pidns_get_parent to use it. So you would instead be > >>

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Daniel Colascione
On Mon, Nov 19, 2018 at 1:21 PM, Christian Brauner wrote: > That can be done without a loop by comparing the level counter for the > two pid namespaces. > >> >> And you can rewrite pidns_get_parent to use it. So you would instead be >> doing: >> >> if (pidns_is_descendant(proc_pid_ns,

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Daniel Colascione
On Mon, Nov 19, 2018 at 1:21 PM, Christian Brauner wrote: > That can be done without a loop by comparing the level counter for the > two pid namespaces. > >> >> And you can rewrite pidns_get_parent to use it. So you would instead be >> doing: >> >> if (pidns_is_descendant(proc_pid_ns,

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Aleksa Sarai
On 2018-11-19, Christian Brauner wrote: > On Tue, Nov 20, 2018 at 08:18:10AM +1100, Aleksa Sarai wrote: > > On 2018-11-19, Christian Brauner wrote: > > > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > > > On 2018-11-19, Christian Brauner wrote: > > > > > + if (info) { > >

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Aleksa Sarai
On 2018-11-19, Christian Brauner wrote: > On Tue, Nov 20, 2018 at 08:18:10AM +1100, Aleksa Sarai wrote: > > On 2018-11-19, Christian Brauner wrote: > > > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > > > On 2018-11-19, Christian Brauner wrote: > > > > > + if (info) { > >

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Aleksa Sarai
On 2018-11-20, Aleksa Sarai wrote: > On 2018-11-19, Christian Brauner wrote: > > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > > On 2018-11-19, Christian Brauner wrote: > > > > + if (info) { > > > > + ret = __copy_siginfo_from_user(sig, , info); > > > > +

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Aleksa Sarai
On 2018-11-20, Aleksa Sarai wrote: > On 2018-11-19, Christian Brauner wrote: > > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > > On 2018-11-19, Christian Brauner wrote: > > > > + if (info) { > > > > + ret = __copy_siginfo_from_user(sig, , info); > > > > +

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Tue, Nov 20, 2018 at 08:18:10AM +1100, Aleksa Sarai wrote: > On 2018-11-19, Christian Brauner wrote: > > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > > On 2018-11-19, Christian Brauner wrote: > > > > + if (info) { > > > > + ret =

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Tue, Nov 20, 2018 at 08:18:10AM +1100, Aleksa Sarai wrote: > On 2018-11-19, Christian Brauner wrote: > > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > > On 2018-11-19, Christian Brauner wrote: > > > > + if (info) { > > > > + ret =

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Tue, Nov 20, 2018 at 08:18:10AM +1100, Aleksa Sarai wrote: > On 2018-11-19, Christian Brauner wrote: > > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > > On 2018-11-19, Christian Brauner wrote: > > > > + if (info) { > > > > + ret =

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Tue, Nov 20, 2018 at 08:18:10AM +1100, Aleksa Sarai wrote: > On 2018-11-19, Christian Brauner wrote: > > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > > On 2018-11-19, Christian Brauner wrote: > > > > + if (info) { > > > > + ret =

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Aleksa Sarai
On 2018-11-19, Christian Brauner wrote: > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > On 2018-11-19, Christian Brauner wrote: > > > + if (info) { > > > + ret = __copy_siginfo_from_user(sig, , info); > > > + if (unlikely(ret)) > > > + goto

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Aleksa Sarai
On 2018-11-19, Christian Brauner wrote: > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > On 2018-11-19, Christian Brauner wrote: > > > + if (info) { > > > + ret = __copy_siginfo_from_user(sig, , info); > > > + if (unlikely(ret)) > > > + goto

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Mon, Nov 19, 2018 at 09:55:18PM +0100, Christian Brauner wrote: > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > On 2018-11-19, Christian Brauner wrote: > > > + if (info) { > > > + ret = __copy_siginfo_from_user(sig, , info); > > > + if (unlikely(ret)) > > >

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Mon, Nov 19, 2018 at 09:55:18PM +0100, Christian Brauner wrote: > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > On 2018-11-19, Christian Brauner wrote: > > > + if (info) { > > > + ret = __copy_siginfo_from_user(sig, , info); > > > + if (unlikely(ret)) > > >

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > On 2018-11-19, Christian Brauner wrote: > > + if (info) { > > + ret = __copy_siginfo_from_user(sig, , info); > > + if (unlikely(ret)) > > + goto err; > > + /* > > +* Not

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > On 2018-11-19, Christian Brauner wrote: > > + if (info) { > > + ret = __copy_siginfo_from_user(sig, , info); > > + if (unlikely(ret)) > > + goto err; > > + /* > > +* Not

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Aleksa Sarai
On 2018-11-19, Christian Brauner wrote: > + if (info) { > + ret = __copy_siginfo_from_user(sig, , info); > + if (unlikely(ret)) > + goto err; > + /* > + * Not even root can pretend to send signals from the kernel. > +

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Aleksa Sarai
On 2018-11-19, Christian Brauner wrote: > + if (info) { > + ret = __copy_siginfo_from_user(sig, , info); > + if (unlikely(ret)) > + goto err; > + /* > + * Not even root can pretend to send signals from the kernel. > +

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Daniel Colascione
Yep. That's also what I was talking about, FWIW. On Mon, Nov 19, 2018 at 11:31 AM, Christian Brauner wrote: > On Mon, Nov 19, 2018 at 01:02:06PM -0600, Eric W. Biederman wrote: >> Christian Brauner writes: >> >> > On Mon, Nov 19, 2018 at 07:59:24AM -0800, Daniel Colascione wrote: >> >> You

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Daniel Colascione
Yep. That's also what I was talking about, FWIW. On Mon, Nov 19, 2018 at 11:31 AM, Christian Brauner wrote: > On Mon, Nov 19, 2018 at 01:02:06PM -0600, Eric W. Biederman wrote: >> Christian Brauner writes: >> >> > On Mon, Nov 19, 2018 at 07:59:24AM -0800, Daniel Colascione wrote: >> >> You

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Mon, Nov 19, 2018 at 01:02:06PM -0600, Eric W. Biederman wrote: > Christian Brauner writes: > > > On Mon, Nov 19, 2018 at 07:59:24AM -0800, Daniel Colascione wrote: > >> You never addressed my comment on the previous patch about your use of > > > > Sorry, that thread exploded so quickly that

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Mon, Nov 19, 2018 at 01:02:06PM -0600, Eric W. Biederman wrote: > Christian Brauner writes: > > > On Mon, Nov 19, 2018 at 07:59:24AM -0800, Daniel Colascione wrote: > >> You never addressed my comment on the previous patch about your use of > > > > Sorry, that thread exploded so quickly that

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Eric W. Biederman
Christian Brauner writes: > On Mon, Nov 19, 2018 at 07:59:24AM -0800, Daniel Colascione wrote: >> You never addressed my comment on the previous patch about your use of > > Sorry, that thread exploded so quickly that I might have missed it. > >> private_data here. Why can't you use the struct

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Eric W. Biederman
Christian Brauner writes: > On Mon, Nov 19, 2018 at 07:59:24AM -0800, Daniel Colascione wrote: >> You never addressed my comment on the previous patch about your use of > > Sorry, that thread exploded so quickly that I might have missed it. > >> private_data here. Why can't you use the struct

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Mon, Nov 19, 2018 at 07:45:04AM -0800, Andy Lutomirski wrote: > On Mon, Nov 19, 2018 at 2:33 AM Christian Brauner > wrote: > > > > The kill() syscall operates on process identifiers. After a process has > > exited its pid can be reused by another process. If a caller sends a signal > > to a

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Mon, Nov 19, 2018 at 07:45:04AM -0800, Andy Lutomirski wrote: > On Mon, Nov 19, 2018 at 2:33 AM Christian Brauner > wrote: > > > > The kill() syscall operates on process identifiers. After a process has > > exited its pid can be reused by another process. If a caller sends a signal > > to a

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Mon, Nov 19, 2018 at 07:59:24AM -0800, Daniel Colascione wrote: > On Mon, Nov 19, 2018 at 2:32 AM, Christian Brauner > wrote: > > The kill() syscall operates on process identifiers. After a process has > > exited its pid can be reused by another process. If a caller sends a signal > > to a

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Mon, Nov 19, 2018 at 07:59:24AM -0800, Daniel Colascione wrote: > On Mon, Nov 19, 2018 at 2:32 AM, Christian Brauner > wrote: > > The kill() syscall operates on process identifiers. After a process has > > exited its pid can be reused by another process. If a caller sends a signal > > to a

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Mon, Nov 19, 2018 at 06:10:53PM +0100, Eugene Syromiatnikov wrote: > On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > > diff --git a/arch/x86/entry/syscalls/syscall_32.tbl > > b/arch/x86/entry/syscalls/syscall_32.tbl > > index 3cf7b533b3d1..e637eab883e9 100644 > > ---

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
On Mon, Nov 19, 2018 at 06:10:53PM +0100, Eugene Syromiatnikov wrote: > On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > > diff --git a/arch/x86/entry/syscalls/syscall_32.tbl > > b/arch/x86/entry/syscalls/syscall_32.tbl > > index 3cf7b533b3d1..e637eab883e9 100644 > > ---

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Eugene Syromiatnikov
On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > +/** > + * sys_procfd_signal - send a signal to a process through a process file > + * descriptor > + * @fd: the file descriptor of the process > + * @sig: signal to be sent > + * @info: the signal info >

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Eugene Syromiatnikov
On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > +/** > + * sys_procfd_signal - send a signal to a process through a process file > + * descriptor > + * @fd: the file descriptor of the process > + * @sig: signal to be sent > + * @info: the signal info >

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Eugene Syromiatnikov
On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > diff --git a/arch/x86/entry/syscalls/syscall_32.tbl > b/arch/x86/entry/syscalls/syscall_32.tbl > index 3cf7b533b3d1..e637eab883e9 100644 > --- a/arch/x86/entry/syscalls/syscall_32.tbl > +++

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Eugene Syromiatnikov
On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > diff --git a/arch/x86/entry/syscalls/syscall_32.tbl > b/arch/x86/entry/syscalls/syscall_32.tbl > index 3cf7b533b3d1..e637eab883e9 100644 > --- a/arch/x86/entry/syscalls/syscall_32.tbl > +++

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Daniel Colascione
On Mon, Nov 19, 2018 at 2:32 AM, Christian Brauner wrote: > The kill() syscall operates on process identifiers. After a process has > exited its pid can be reused by another process. If a caller sends a signal > to a reused pid it will end up signaling the wrong process. This issue has > often

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Daniel Colascione
On Mon, Nov 19, 2018 at 2:32 AM, Christian Brauner wrote: > The kill() syscall operates on process identifiers. After a process has > exited its pid can be reused by another process. If a caller sends a signal > to a reused pid it will end up signaling the wrong process. This issue has > often

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Daniel Colascione
On Mon, Nov 19, 2018 at 7:45 AM, Andy Lutomirski wrote: > On Mon, Nov 19, 2018 at 2:33 AM Christian Brauner > wrote: >> >> The kill() syscall operates on process identifiers. After a process has >> exited its pid can be reused by another process. If a caller sends a signal >> to a reused pid it

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Daniel Colascione
On Mon, Nov 19, 2018 at 7:45 AM, Andy Lutomirski wrote: > On Mon, Nov 19, 2018 at 2:33 AM Christian Brauner > wrote: >> >> The kill() syscall operates on process identifiers. After a process has >> exited its pid can be reused by another process. If a caller sends a signal >> to a reused pid it

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Andy Lutomirski
On Mon, Nov 19, 2018 at 2:33 AM Christian Brauner wrote: > > The kill() syscall operates on process identifiers. After a process has > exited its pid can be reused by another process. If a caller sends a signal > to a reused pid it will end up signaling the wrong process. This issue has > often

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Andy Lutomirski
On Mon, Nov 19, 2018 at 2:33 AM Christian Brauner wrote: > > The kill() syscall operates on process identifiers. After a process has > exited its pid can be reused by another process. If a caller sends a signal > to a reused pid it will end up signaling the wrong process. This issue has > often

[PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
The kill() syscall operates on process identifiers. After a process has exited its pid can be reused by another process. If a caller sends a signal to a reused pid it will end up signaling the wrong process. This issue has often surfaced and there has been a push [1] to address this problem. A

[PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-19 Thread Christian Brauner
The kill() syscall operates on process identifiers. After a process has exited its pid can be reused by another process. If a caller sends a signal to a reused pid it will end up signaling the wrong process. This issue has often surfaced and there has been a push [1] to address this problem. A