On Thu, Nov 20, 2014 at 02:13:04PM +0900, AKASHI Takahiro wrote:
On 11/20/2014 04:06 AM, Will Deacon wrote:
What does x86 do?
On x86, syscall(-1) returns -ENOSYS if not traced, and we can change a return value if traced.
... which is used for UML (user mode Linux). UML works by spawning processes under the host kernel, which run with syscall tracing enabled, with the UML kernel as the tracer. The UML kernel tracer receives the syscall trace event when the child tries to execute a syscall, decodes the syscall, executes syscall in the UML kernel, and then cancels the syscall in the host kernel, setting the return code appropriately.