Thread (42 messages) 42 messages, 10 authors, 2018-11-29

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

From: "Serge E. Hallyn" <serge@hallyn.com>
Date: 2018-11-22 18:26:23
Also in: linux-api, linux-fsdevel, lkml

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:
quoted
+/**
+ *  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
+ *  @flags: future flags to be passed
+ */
+SYSCALL_DEFINE4(procfd_signal, int, fd, int, sig, siginfo_t __user *, info,
+		int, flags)
+{
Can I just register an objection here that I think using a syscall
just for this is silly?

My understanding is that the concern is that some code might do:

unknown_fd = recv_fd();
ioctl(unknown_fd, SOME_IOCTL, NULL); // where SOME_IOCTL == PROC_FD_KILL
// whoops, unknown_fd was a procfd and we killed a task!
This could just be my own mental model, but for something like "kill a
task", an ioctl just seems wrong.  Syscall seems more natural.

I'd ack either method.

-serge
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help