Re: Starting process from kernel space

Andrea Arcangeli (arcangeli@mbox.queen.it)
Tue, 23 Sep 1997 14:47:44 +0200 (CEST)


On Tue, 23 Sep 1997, Bruno Abele wrote:

>Hi,
>
>I need to start a process/program while being in the kernel to filter
>some text. The input and output are used by a filesystem (in kernel, not
>a deamon). The filesystem decides, when to start the program and
>waits for it to finish, the result is then used. The user process must
>not be destroyed.
>
>Example:
>User decides to access file "a". There exists no file a, but files b and
>c. Program (userdefined) should start, get the names a, b and c as input
>and respond b or c. For security reasons program runs as user's process.
>
>Which is better: Giving files as params or read them from stdin?
>
>And more important: Is it possible to do this with the current kernel?
>What other way (deamon?) is available?
>
>kernel_thread may not be useable from within kernelspace, and the same
>with fork/execve?

Take a look to addtimer() and linux/tqueue.h. I don' t know if it will
help you but is what I use to "_fork_" inside kernel space.

Andrea(S) Arcangeli