[PATCH]: PTRACE_PEEKUSER redux...

David S. Miller davem@davemloft.net
Fri Apr 7 21:35:00 GMT 2006


From: Daniel Jacobowitz <drow@false.org>
Date: Fri, 7 Apr 2006 09:16:23 -0400

> On Thu, Apr 06, 2006 at 10:03:57PM -0700, David S. Miller wrote:
> > In all cases, no matter what ptrace operation is specified, if the
> > child does not exist the error return we will get is -ESRCH (task not
> > found for pid) or -EPERM (trying to trace init or similar).
> 
> This relies on all platforms doing the permission check before the
> operation check.  Well, I guess it's still better than what we had
> before, right?

I definitely think so.

> > 2006-04-06  David S. Miller  <davem@sunset.davemloft.net>
> > 
> > 	* linux-nat.c (linux_nat_thread_alive): Thread is alive
> > 	as long as errno is neither -ESRCH nor -EPERM.  This allows
> > 	to handle cleanly the case where PTRACE_PEEKUSER is not
> > 	a supported ptrace operation for a given Linux target.
> 
> OK, except, please reverse the changelog and the patch :-)  This
> comment should be in the source code, or we'll break it again later.

Ok, will do.  Thanks a lot for reviewing.



More information about the Gdb-patches mailing list