Re: [PATCH] ptrace(2): note SPARC deviation wrt get/set regs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 24, 2012 at 3:55 PM, Mike Frysinger <vapier@xxxxxxxxxx> wrote:
> On Sunday 22 April 2012 14:56:14 Michael Kerrisk (man-pages) wrote:
>> You long ago sent the patch below, but I didn't respond. I'm just
>> pulling up a few old ptrace pieces now for review.
>>
>> Your patch below relates to PTRACE_GETREGS, PTRACE_GETFPREGS,
>> PTRACE_SETREGS, PTRACE_SETFPREGS. (The patch below no longer is
>> current, but is easy to fix)
>>
>> Looking at arch/sparc/kernel/ptrace_32.c, I think I see what the point
>> of the patch is. However, the text is a bit cryptic. Would it not be
>> better to say something like
>
> seemed clear to me, but i wrote it ;)
>
>> [[
>> Note that SPARC systems have the meaning of \fIdata\fP and \fIaddr\fP
>> reversed; that is, \fIdata\fP is ignored and the registers are copied to
>> [from] \fIaddr\fP.
>> ]]
>
> i'd suggest "via" rather than "to [from]"

Thanks Mike. I've applied the patch below for 3.40.

Cheers,

Michael

--- a/man2/ptrace.2
+++ b/man2/ptrace.2
@@ -213,24 +213,32 @@ some modifications to the USER area are disallowed.
 .\" and when they are disallowed, how does userspace discover that fact?
 .TP
 .BR PTRACE_GETREGS ", " PTRACE_GETFPREGS
 Copy the tracee's general-purpose or floating-point registers,
 respectively, to the address
 .I data
 in the tracer.
 See
 .I <sys/user.h>
 for information on the format of this data.
 .RI ( addr
 is ignored.)
+Note that SPARC systems have the meaning of
+.I data
+and
+.I addr
+reversed; that is,
+.I data
+is ignored and the registers are copied to the address
+.IR addr .
 .TP
 .BR PTRACE_GETSIGINFO " (since Linux 2.3.99-pre6)"
 Retrieve information about the signal that caused the stop.
 Copy a
 .I siginfo_t
 structure (see
 .BR sigaction (2))
 from the tracee to the address
 .I data
 in the tracer.
 .RI ( addr
 is ignored.)
@@ -238,24 +246,32 @@ is ignored.)
 .BR PTRACE_SETREGS ", " PTRACE_SETFPREGS
 Copy the tracee's general-purpose or floating-point registers,
 respectively, from the address
 .I data
 in the tracer.
 As for
 .BR PTRACE_POKEUSER ,
 some general-purpose register modifications may be disallowed.
 .\" FIXME In the preceding sentence, which modifications are disallowed,
 .\" and when they are disallowed, how does userspace discover that fact?
 .RI ( addr
 is ignored.)
+Note that SPARC systems have the meaning of
+.I data
+and
+.I addr
+reversed; that is,
+.I data
+is ignored and the registers are copied from the address
+.IR addr .
 .TP
 .BR PTRACE_SETSIGINFO " (since Linux 2.3.99-pre6)"
 Set signal information:
 copy a
 .I siginfo_t
 structure from the address
 .I data
 in the tracer to the tracee.
 This will affect only signals that would normally be delivered to
 the tracee and were caught by the tracer.
 It may be difficult to tell
 these normal signals from synthetic signals generated by



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux