* [PATCH] ptrace.2: Mention that PTRACE_PEEK* libc API and kernel API are different
@ 2013-07-02 11:20 Denys Vlasenko
[not found] ` <1372764004-1791-1-git-send-email-dvlasenk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Denys Vlasenko @ 2013-07-02 11:20 UTC (permalink / raw)
To: Michael Kerrisk
Cc: Denys Vlasenko, linux-man-u79uwXL29TY76Z2rM5mHXA, Oleg Nesterov,
Jan Kratochvil, Dmitry V. Levin
By Oleg's request.
Signed-off-by: Denys Vlasenko <dvlasenk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
CC: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
CC: Oleg Nesterov <oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
CC: Jan Kratochvil <jan.kratochvil-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
CC: Dmitry V. Levin <ldv-u2l5PoMzF/Vg9hUCZPvPmw@public.gmane.org>
---
man2/ptrace.2 | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/man2/ptrace.2 b/man2/ptrace.2
index 55c4fe2..a6e01a0 100644
--- a/man2/ptrace.2
+++ b/man2/ptrace.2
@@ -1776,8 +1776,15 @@ the report is sent only once.
.SH RETURN VALUE
On success,
.B PTRACE_PEEK*
-requests return the requested data,
-while other requests return zero.
+requests return the requested data, while other requests return zero.
+(On Linux, this is done in the libc wrapper around ptrace system call.
+On the system call level,
+.B PTRACE_PEEK*
+requests have a different API: they store the result
+at the address specified by
+.I data
+parameter, and return value is the error flag.)
+.LP
On error, all requests return \-1, and
.I errno
is set appropriately.
--
1.8.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1372764004-1791-1-git-send-email-dvlasenk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] ptrace.2: Mention that PTRACE_PEEK* libc API and kernel API are different [not found] ` <1372764004-1791-1-git-send-email-dvlasenk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2013-07-02 19:50 ` Oleg Nesterov 2013-07-10 18:27 ` Michael Kerrisk 1 sibling, 0 replies; 3+ messages in thread From: Oleg Nesterov @ 2013-07-02 19:50 UTC (permalink / raw) To: Denys Vlasenko Cc: Michael Kerrisk, linux-man-u79uwXL29TY76Z2rM5mHXA, Jan Kratochvil, Dmitry V. Levin On 07/02, Denys Vlasenko wrote: > > By Oleg's request. I spent several hours trying to understand why my test-case doesn't work ;) > .B PTRACE_PEEK* > -requests return the requested data, > -while other requests return zero. > +requests return the requested data, while other requests return zero. > +(On Linux, this is done in the libc wrapper around ptrace system call. > +On the system call level, > +.B PTRACE_PEEK* > +requests have a different API: they store the result > +at the address specified by > +.I data > +parameter, and return value is the error flag.) > +.LP Thanks! Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ptrace.2: Mention that PTRACE_PEEK* libc API and kernel API are different [not found] ` <1372764004-1791-1-git-send-email-dvlasenk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 2013-07-02 19:50 ` Oleg Nesterov @ 2013-07-10 18:27 ` Michael Kerrisk 1 sibling, 0 replies; 3+ messages in thread From: Michael Kerrisk @ 2013-07-10 18:27 UTC (permalink / raw) To: Denys Vlasenko Cc: Michael Kerrisk, linux-man-u79uwXL29TY76Z2rM5mHXA, Oleg Nesterov, Jan Kratochvil, Dmitry V. Levin Thanks, Denys. Applied. On 07/02/13 13:20, Denys Vlasenko wrote: > By Oleg's request. > > Signed-off-by: Denys Vlasenko <dvlasenk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > CC: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > CC: Oleg Nesterov <oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > CC: Jan Kratochvil <jan.kratochvil-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > CC: Dmitry V. Levin <ldv-u2l5PoMzF/Vg9hUCZPvPmw@public.gmane.org> > --- > man2/ptrace.2 | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/man2/ptrace.2 b/man2/ptrace.2 > index 55c4fe2..a6e01a0 100644 > --- a/man2/ptrace.2 > +++ b/man2/ptrace.2 > @@ -1776,8 +1776,15 @@ the report is sent only once. > .SH RETURN VALUE > On success, > .B PTRACE_PEEK* > -requests return the requested data, > -while other requests return zero. > +requests return the requested data, while other requests return zero. > +(On Linux, this is done in the libc wrapper around ptrace system call. > +On the system call level, > +.B PTRACE_PEEK* > +requests have a different API: they store the result > +at the address specified by > +.I data > +parameter, and return value is the error flag.) > +.LP > On error, all requests return \-1, and > .I errno > is set appropriately. > -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-10 18:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-02 11:20 [PATCH] ptrace.2: Mention that PTRACE_PEEK* libc API and kernel API are different Denys Vlasenko
[not found] ` <1372764004-1791-1-git-send-email-dvlasenk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-07-02 19:50 ` Oleg Nesterov
2013-07-10 18:27 ` Michael Kerrisk
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).