Re: [PATCH] 2-ptrace_multi

From: Jeff Dike
Date: Sat May 20 2006 - 17:42:12 EST

On Sat, May 20, 2006 at 08:30:20PM +0200, Renzo Davoli wrote:
> Let me point out that PTRACE_MULTI is not only related to memory access.
> We are using PTRACE_MULTI also to store the registers and restart the
> execution of the ptraced process with a single syscall.
> This is very effective when umview runs on a ppc32 architecture. In
> fact, PPC_PTRACE_{G,S}ETREGS do not exist for that architecture
> (IMHO there is no evident reason for that). Without PTRACE_MULTI each register
> must be read/written individually by a PTRACE_{PEEK,POKE}USER(*)

Wouldn't the obvious fix be to implement [GS]ETREGS for arches that don't
have them?

> PTRACE_MULTI can be also used to optimize many other virtualized calls,
> e.g. to read/write all the buffers for a readv/writev/recvmsg/sendmsg
> call at once.

Here, I bet the data copying cost dominates the system call, and the
syscall overhead is minimal.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at