Skip to contentSkip to conversation

arch_prctl.2 changes

PATCH Michael Kerrisk 2 participants 3 messages Jan 2, 2008 – Jan 3, 2008 2 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

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 (working copy) renamed from arch_prctl.2 (revision 3423) +20 -13
@@ -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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 6 lines · 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.

Quoted 3 lines

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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 8 lines · Andi Kleen
Quoted 6 lines · 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?)

Quoted 6 lines

Yes.

Quoted 2 lines

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

Signature · 11 lines
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html