From: Jeff D. <jd...@ad...> - 2005-07-17 15:00:14
|
On Sun, Jul 17, 2005 at 03:52:46PM +0800, Alex LIU wrote: > In fact I want to port Bproc to UML. Now Bproc is based on i386. And > a part of the main work Bproc does is about the kernel thread...Bproc > create a new kernel thread function with the name bproc_kernel_thread > in i386 and let the Bproc kernel thread go to the user space rather > than exit. What does it run when it enters userspace? The only other thing I can think of which does this is the kernel thread that turns into init, which it does by calling exec. > In UML,I found in finish_fork_handler, set_user_mode is called at > last. I think it's purpose is to let the new forked process go to > the user space like ret_from_fork in i386. If you look at its implementation, you'll see that it is very tt-mode specific, and thus can't do something as basic as re-entering userspace in a generic way. If you are entering userspace, you need for there to be something there to enter. Jeff |