Re: [PATCH] ptrace PTRACE_READDATA/WRITEDATA, kernel 2.5.62

From: Manfred Spraul (manfred@colorfullife.com)
Date: Mon Feb 24 2003 - 13:21:12 EST


On Mon, Feb 24, 2003 at 03:05:14PM +0100, fcorneli@elis.rug.ac.be wrote:

>+ ret = 0;
>+ res = ptrace_readdata(child, addr, (void *)addr2, data);
>+ if (res == data)
>+ break;
>
>
You mention sparc - have you tested if that works on sparc?
ptrace_readdata assumes that addr2 is a pointer to kernel space, not
user space. It works by chance on i386, but that's not acceptable for
merging.
You must double buffer, check mem_read in fs/proc/base.c

Daniel wrote:

>Thirdly, I was going to do this, but I ended up making GDB use pread64
>on /dev/mem instead. It works with no kernel modifications, and is
>just as fast.
>
>
I assume you mean /proc/<pid>/mem. Performance is identical, same
implementation.

--
    Manfred

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 28 2003 - 22:00:21 EST