Hi. I am doing some experiment on mconsole driver. My wish is to create a
new user process from mconsole driver, modifying its address space, changing
its file mapping... Eventually may be I can migrate a process from host or
between UML instances. I am a newbie to both kernel and UML, and I have
several questions on implementation:
1. create a new process from a kernel thread. It seems that mconsole uses a
work queque, and requests are processed at kevents thread. Right now what I
am doing is, creating a new kernel thread and letting it call sys_ececve().
I then find its task_struct by looking for its name and its parent. It seems
stupid and maybe not correct. Is there any better way to do this?
2. I need to manipulate the process' address space (memory segments, file
mappings) like what flush_old_exec() and do_mmap() are doing. I cannot find
a way to call those functions since I am in a kernel thread, and it seems
too complicated by working directly on page tables and memory. How can this
be done in a convenient way?
Thanks,
Weiming Liu
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel