On Mon, Mar 19, 2007 at 10:38:27AM +0800, Krishnappa Abhijith-A21204 wrote:
> Is the below flow correct for UML (TT mode)
Maybe, maybe not - your terminology is somewhat confusing.
> 1. UML process wants to execute a sys call say open().
> 2. UML TT comes to know this
By having PTRACE_SYSCALL on the host return status SIGTRAP | 0x80 from wait().
> annuls with getpid(), and UML TT executes
> open() on behalf of UML process.
If UML TT refers to the tracing thread, this is wrong. The TT ptraces
a set of (UML) kernel register values into the process, and it (not
the TT) executes the open.
> 3. UML process executes the getpid() and returns and signals TT.
This happened before step 2.
> 4. By this time UML TT has finished executing the system call open and
> has returned back, so TT fills in the registers of UML process.
The system-call-making process finished executing in the UML kernel,
and signals the TT (by sending itself a signal, which will bump the TT
out of wait()) that it should return to userspace.
> 5. Now UML process executes normally with the open file descriptor.
>
> If the above steps are correct, then How does UML protects host kernel.
> because even here TT will ask for host kernel services which may corrupt
> host kernel ?
The *host* kernel is protected by hardware. UML is a normal process
with no more access to the host kernel than ls.
There is a related, good question here, which is how is the UML kernel
protected, given that it is present, and not protected, in the process
address space. The answer is that it isn't, at least not without
severe performance penalties. This is largely what led to the skas
modes.
Jeff
--
Work email - jdike at linux dot intel dot com
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel