public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* arch_prctl.2 changes
@ 2008-01-02  9:54 Michael Kerrisk
       [not found] ` <477B5F43.3070009-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Kerrisk @ 2008-01-02  9:54 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Hi Andi,

I noticed some apparent inconsistencies in the arch_prctl.2 page
(http://www.kernel.org/doc/man-pages/online/pages/man2/arch_prctl.2.html ).
 The main issue is that 'addr' is interpreted as an unsigned long or as an
unsigned long *, depending on code.  (right?)

For man-pages-2.75, I have applied the following patch, which also updates
a few other minor points.  Does this look okay to you?

Cheers,

Michael

===================================================================
--- arch_prctl.2        (revision 3423)
+++ arch_prctl.2        (working copy)
@@ -21,24 +21,33 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
-.TH ARCH_PRCTL 2 2003-02-02 "Linux" "Linux Programmer's Manual"
+.TH ARCH_PRCTL 2 2007-12-26 "Linux" "Linux Programmer's Manual"
 .SH NAME
-arch_prctl \- set architecture specific thread state
+arch_prctl \- set architecture-specific thread state
 .SH SYNOPSIS
+.nf
 .B #include <asm/prctl.h>
 .br
 .B #include <sys/prctl.h>
 .sp
 .BI "int arch_prctl(int " code ", unsigned long " addr );
+.BI "int arch_prctl(int " code ", unsigned long *" addr );
+.fi
 .SH DESCRIPTION
 The
 .BR arch_prctl ()
-function sets architecture specific process or thread state.
+function sets architecture-specific process or thread state.
 .I code
 selects a subfunction
 and passes argument
 .I addr
-to it.
+to it;
+.I addr
+is interpreted as either an
+.I "unsigned long"
+for the "set" operations, or as an
+.IR "unsigned long *" ,
+for the "get" operations.
 .LP
 Sub functions for x86-64 are:
 .TP
@@ -53,9 +62,8 @@
 .I FS
 register of the current thread in the
 .I unsigned long
-pointed to by the
-.I address
-parameter.
+pointed to
+.IR addr .
 .TP
 .B ARCH_SET_GS
 Set the 64-bit base for the
@@ -68,11 +76,10 @@
 .I GS
 register of the current thread in the
 .I unsigned long
-pointed to by the
-.I address
-parameter.
+pointed to
+.IR addr .
 .SH RETURN VALUE
-On sucess,
+On success,
 .BR arch_prctl ()
 returns 0; on error, \-1 is returned, and
 .I errno
@@ -111,7 +118,7 @@
 .BR modify_ldt (2)
 or using the
 .BR set_thread_area (2)
-system call in a 2.5 kernel.
+system call in kernel 2.5 or later.
 .BR arch_prctl ()
 is only needed when you want to set bases that are larger than 4GB.
 Memory in the first 2GB of address space can be allocated by using
@@ -120,7 +127,7 @@
 .B MAP_32BIT
 flag.

-As of version 2.3.5, glibc provides no prototype for
+As of version 2.7, glibc provides no prototype for
 .BR arch_prctl ().
 You have to declare it yourself for now.
 This may be fixed in future glibc versions.


-
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: arch_prctl.2 changes
       [not found] ` <477B5F43.3070009-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2008-01-02 10:03   ` Andi Kleen
       [not found]     ` <200801021103.40079.ak-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2008-01-02 10:03 UTC (permalink / raw)
  To: Michael Kerrisk; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

On Wednesday 02 January 2008 10:54:11 Michael Kerrisk wrote:
> Hi Andi,
> 
> I noticed some apparent inconsistencies in the arch_prctl.2 page
> (http://www.kernel.org/doc/man-pages/online/pages/man2/arch_prctl.2.html ).
>  The main issue is that 'addr' is interpreted as an unsigned long or as an
> unsigned long *, depending on code.  (right?)

Yes.

> 
> For man-pages-2.75, I have applied the following patch, which also updates
> a few other minor points.  Does this look okay to you?

Yes.

-Andi
-
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: arch_prctl.2 changes
       [not found]     ` <200801021103.40079.ak-l3A5Bk7waGM@public.gmane.org>
@ 2008-01-03 10:10       ` Michael Kerrisk
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Kerrisk @ 2008-01-03 10:10 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Michael Kerrisk, linux-man-u79uwXL29TY76Z2rM5mHXA



Andi Kleen wrote:
> On Wednesday 02 January 2008 10:54:11 Michael Kerrisk wrote:
>> Hi Andi,
>>
>> I noticed some apparent inconsistencies in the arch_prctl.2 page
>> (http://www.kernel.org/doc/man-pages/online/pages/man2/arch_prctl.2.html ).
>>  The main issue is that 'addr' is interpreted as an unsigned long or as an
>> unsigned long *, depending on code.  (right?)
> 
> Yes.
> 
>> For man-pages-2.75, I have applied the following patch, which also updates
>> a few other minor points.  Does this look okay to you?
> 
> Yes.

Okay.  Thanks Andi!

Cheers,

Michael

-- 
Michael Kerrisk
Maintainer of the Linux man-pages project
http://www.kernel.org/doc/man-pages/
Want to report a man-pages bug?  Look here:
http://www.kernel.org/doc/man-pages/reporting_bugs.html


-
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:[~2008-01-03 10:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-02  9:54 arch_prctl.2 changes Michael Kerrisk
     [not found] ` <477B5F43.3070009-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-01-02 10:03   ` Andi Kleen
     [not found]     ` <200801021103.40079.ak-l3A5Bk7waGM@public.gmane.org>
2008-01-03 10:10       ` Michael Kerrisk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox