Messages in this thread | | | Date | Mon, 24 Feb 2003 19:21:12 +0100 | From | Manfred Spraul <> | Subject | Re: [PATCH] ptrace PTRACE_READDATA/WRITEDATA, kernel 2.5.62 |
| |
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/
| |