aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2012-04-16 10:31:09 +1200
committerMichael Kerrisk <mtk.manpages@gmail.com>2012-04-17 23:09:04 +1200
commit69287cb678589ee38ac5fc99708d83a84cd0ae7b (patch)
tree2a29805fd1195ca44dfa5b8f14367c1402e0a5f8
parent3612be04180185f3cf02fba33d470ff07e4187a2 (diff)
downloadman-pages-69287cb678589ee38ac5fc99708d83a84cd0ae7b.tar.gz
prctl.2: Fixes to PR_SET_MM after comments from Cyrill
Remove some FIXMEs and comment out pieces of text that describe features not yet merged mainline kernel. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/prctl.2198
1 files changed, 96 insertions, 102 deletions
diff --git a/man2/prctl.2 b/man2/prctl.2
index e6d4ccc836..c8979e3f6e 100644
--- a/man2/prctl.2
+++ b/man2/prctl.2
@@ -434,11 +434,8 @@ The corresponding memory area must be readable and writable.
Set the address above which the program heap can be expanded with
.BR brk (2)
call.
-.\" FIXME In the next sentence, shouldn't "not be greater" be "be greater"?
-The address must not be greater than the ending address of
+The address must be greater than the ending address of
the current program data segment.
-.\" FIXME I completely rewrote the following sentence. Is it okay?
-.\" FIXME Is the following error documented in ERRORS?
In addition, the combined size of the resulting heap and
the size of the data segment can't exceed the
.BR RLIMIT_DATA
@@ -452,67 +449,66 @@ value.
The requirements for the address are the same as for the
.BR PR_SET_MM_START_BRK
option.
-.\" FIXME Delete or comment out the following? (until ========)
-.\" None of the following constants exist in current kernel source
-.\" What is the state of the kernel patches for these?
-.TP
-.BR PR_SET_MM_ARG_START
-Set the address above which the program command line is placed.
-.TP
-.BR PR_SET_MM_ARG_END
-Set the address below which the program command line is placed.
-.TP
-.BR PR_SET_MM_ENV_START
-Set the address above which the program environment is placed.
-.TP
-.BR PR_SET_MM_ENV_END
-Set the address below which the program environment is placed.
-.IP
-The address passed with
-.BR PR_SET_MM_ARG_START ,
-.BR PR_SET_MM_ARG_END ,
-.BR PR_SET_MM_ENV_START ,
-and
-.BR PR_SET_MM_ENV_END
-should belong to a process stack area.
-Thus, the corresponding memory area must be readable, writable, and
-(depending on the kernel configuration) have the
-.BR MAP_GROWSDOWN
-attribute set (see
-.BR mmap (2)).
-.TP
-.BR PR_SET_MM_AUXV
-Set a new auxiliary vector.
-The
-.I arg3
-argument should provide the address of the vector.
-The
-.I arg4
-is the size of the vector.
-.TP
-.BR PR_SET_MM_EXE_FILE
-Supersede the
-.IR /proc/pid/exe
-symbolic link with a new one pointing to a new executable file
-identified by the file descriptor provided in
-.I arg3
-argument.
-The file descriptor should be obtained with a regular
-.BR open (2)
-call.
-.IP
-To change the symbolic link, one needs to unmap all existing
-executable memory areas, including those created by the kernel itself
-(for example the kernel usually creates at least one executable
-memory area for the ELF
-.IR \.text
-section).
-.IP
-The second limitation is that such transitions can be done only once
-in a process life time.
-Any further attempts will be rejected.
-This should help system administrators to monitor the unusual
-symbolic-link transitions over all process running in a system.
+.\" FIXME The following (until ========) is not yet in mainline kernel,
+.\" so commented out for the moment.
+.\" .TP
+.\" .BR PR_SET_MM_ARG_START
+.\" Set the address above which the program command line is placed.
+.\" .TP
+.\" .BR PR_SET_MM_ARG_END
+.\" Set the address below which the program command line is placed.
+.\" .TP
+.\" .BR PR_SET_MM_ENV_START
+.\" Set the address above which the program environment is placed.
+.\" .TP
+.\" .BR PR_SET_MM_ENV_END
+.\" Set the address below which the program environment is placed.
+.\" .IP
+.\" The address passed with
+.\" .BR PR_SET_MM_ARG_START ,
+.\" .BR PR_SET_MM_ARG_END ,
+.\" .BR PR_SET_MM_ENV_START ,
+.\" and
+.\" .BR PR_SET_MM_ENV_END
+.\" should belong to a process stack area.
+.\" Thus, the corresponding memory area must be readable, writable, and
+.\" (depending on the kernel configuration) have the
+.\" .BR MAP_GROWSDOWN
+.\" attribute set (see
+.\" .BR mmap (2)).
+.\" .TP
+.\" .BR PR_SET_MM_AUXV
+.\" Set a new auxiliary vector.
+.\" The
+.\" .I arg3
+.\" argument should provide the address of the vector.
+.\" The
+.\" .I arg4
+.\" is the size of the vector.
+.\" .TP
+.\" .BR PR_SET_MM_EXE_FILE
+.\" Supersede the
+.\" .IR /proc/pid/exe
+.\" symbolic link with a new one pointing to a new executable file
+.\" identified by the file descriptor provided in
+.\" .I arg3
+.\" argument.
+.\" The file descriptor should be obtained with a regular
+.\" .BR open (2)
+.\" call.
+.\" .IP
+.\" To change the symbolic link, one needs to unmap all existing
+.\" executable memory areas, including those created by the kernel itself
+.\" (for example the kernel usually creates at least one executable
+.\" memory area for the ELF
+.\" .IR \.text
+.\" section).
+.\" .IP
+.\" The second limitation is that such transitions can be done only once
+.\" in a process life time.
+.\" Any further attempts will be rejected.
+.\" This should help system administrators to monitor unusual
+.\" symbolic-link transitions over all process running in a system.
.\" ========== END FIXME
.RE
.\"
@@ -569,7 +565,6 @@ or
.BR PR_SET_SECCOMP ,
and the kernel was not configured with
.BR CONFIG_SECCOMP .
-.\" FIXME I added the following lengthy EINVAL entry. Is it correct?
.TP
.B EINVAL
.I option
@@ -605,7 +600,6 @@ or
.BR PR_SET_MM_BRK ,
and
.I arg3
-.\" FIXME Is the following correct (see earlier comment)
is less than or equal to the end of the data segment
or specifies a value that would cause the
.B RLIMIT_DATA
@@ -649,41 +643,41 @@ is
and the caller does not have the
.B CAP_SYS_RESOURCE
capability.
-.TP
-.B EACCES
-.I option
-is
-.BR PR_SET_MM ,
-and
-.I arg3
-is
-.\" FIXME PR_SET_MM_EXE_FILE is not in the kernel sources
-.BR PR_SET_MM_EXE_FILE ,
-the file is not executable.
-.TP
-.B EBUSY
-.I option
-is
-.BR PR_SET_MM ,
-.I arg3
-is
-.\" FIXME PR_SET_MM_EXE_FILE is not in the kernel sources
-.BR PR_SET_MM_EXE_FILE ,
-and this the second attempt to change the
-.I /proc/pid/exe
-symbolic link, which is prohibited.
-.TP
-.B EBADF
-.I option
-is
-.BR PR_SET_MM ,
-.I arg3
-is
-.\" FIXME PR_SET_MM_EXE_FILE is not in the kernel sources
-.BR PR_SET_MM_EXE_FILE ,
-and the file descriptor passed in
-.I arg4
-is not valid.
+.\" FIXME The following (until ========) is not yet in mainline kernel,
+.\" so commented out for the moment.
+.\" .TP
+.\" .B EACCES
+.\" .I option
+.\" is
+.\" .BR PR_SET_MM ,
+.\" and
+.\" .I arg3
+.\" is
+.\" .BR PR_SET_MM_EXE_FILE ,
+.\" the file is not executable.
+.\" .TP
+.\" .B EBUSY
+.\" .I option
+.\" is
+.\" .BR PR_SET_MM ,
+.\" .I arg3
+.\" is
+.\" .BR PR_SET_MM_EXE_FILE ,
+.\" and this the second attempt to change the
+.\" .I /proc/pid/exe
+.\" symbolic link, which is prohibited.
+.\" .TP
+.\" .B EBADF
+.\" .I option
+.\" is
+.\" .BR PR_SET_MM ,
+.\" .I arg3
+.\" is
+.\" .BR PR_SET_MM_EXE_FILE ,
+.\" and the file descriptor passed in
+.\" .I arg4
+.\" is not valid.
+.\" ========== END FIXME
.\" The following can't actually happen, because prctl() in
.\" seccomp mode will cause SIGKILL.
.\" .TP