First page Back Continue Last page Summary Graphics

Virtualization of a system call


Notes:

This shows the process of executing a UML system call. The left two blocks are the two process stacks - the normal process execution stack and the alternate signal stack, which in kernel terms is the kernel stack. The right block is the tracing thread.
Since UML executes normal i386 binaries, which contain int 0x80 instructions for system calls, these must be intercepted and nullified. This is done by the tracing thread, which does system call tracing on all UML processes. When a system call is started, the tracing thread gains control, nullifies it, queues a signal to the process in order to make it run on its kernel stack, and continues it. The process executes the system call inside UML and signals itself when it's done. This signal is intercepted and cancelled by the tracing thread, which restores the original process state, with the system call return value, and continues the process.
The red arrows show the execution of the process in order to demonstrate that that is exactly the same as in a native kernel.