lkml.org 
[lkml]   [2003]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.061 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site