Re: [PATCH v8 2/6] arm64: ptrace: allow tracer to skip a system call

From: Russell King - ARM Linux
Date: Tue Nov 25 2014 - 09:14:16 EST


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.

--
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/