kernel thread --> user process
I would like to push a kernel thread into a user-level process through the use of execve. The kernel thread is started from a loadable module - so there has been no user-level process dipping into the kernel that we could just replace.
The process init does something similar. From what I've been reading it just calls execve() and magically it is a user-level process. Since my code does not generate a user-level process I assume there is more to it than that. Can someone point me in the right direction to accomplishing this? Do I need to generate a user-land stack frame? How?
Please cc [email protected] as I'm currently not subscribed.
Thanks for reading.
-joel
Quoted 3 lines
the use of execve. The kernel thread is started from a loadable module - so there has been no user-level process dipping into the kernel that we could just replace.
Take a look at how the module loader code works - it does precisely what you need