public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Kerrisk <mtk.manpages-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
To: Andi Kleen <ak-l3A5Bk7waGM@public.gmane.org>
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: arch_prctl.2 changes
Date: Wed, 02 Jan 2008 10:54:11 +0100	[thread overview]
Message-ID: <477B5F43.3070009@gmail.com> (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        (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

             reply	other threads:[~2008-01-02  9:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-02  9:54 Michael Kerrisk [this message]
     [not found] ` <477B5F43.3070009-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-01-02 10:03   ` arch_prctl.2 changes Andi Kleen
     [not found]     ` <200801021103.40079.ak-l3A5Bk7waGM@public.gmane.org>
2008-01-03 10:10       ` Michael Kerrisk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=477B5F43.3070009@gmail.com \
    --to=mtk.manpages-gm/ye1e23mwn+bqq9rbeug@public.gmane.org \
    --cc=ak-l3A5Bk7waGM@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox