mirror of https://github.com/mkerrisk/man-pages
prctl.2: Document (uncomment) PR_SET_MM options in Linux 3.5
Some of the PR_SET_MM options were merged to vanilla kernel later, and appeared in Linux 3.5. Those are: - PR_SET_MM_ARG_START - PR_SET_MM_ARG_END - PR_SET_MM_ENV_START - PR_SET_MM_ENV_END - PR_SET_MM_AUXV - PR_SET_MM_EXE_FILE This patch merely uncomments description and error codes for these options, which were present but commented out, and removes the appropriate FIXME marks. Signed-off-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
b40dd7e45d
commit
77649527ec
186
man2/prctl.2
186
man2/prctl.2
|
@ -713,67 +713,64 @@ value.
|
||||||
The requirements for the address are the same as for the
|
The requirements for the address are the same as for the
|
||||||
.BR PR_SET_MM_START_BRK
|
.BR PR_SET_MM_START_BRK
|
||||||
option.
|
option.
|
||||||
.\" FIXME The following (until ========) is not yet in mainline kernel,
|
.TP
|
||||||
.\" so commented out for the moment.
|
.BR PR_SET_MM_ARG_START
|
||||||
.\" .TP
|
Set the address above which the program command line is placed.
|
||||||
.\" .BR PR_SET_MM_ARG_START
|
.TP
|
||||||
.\" Set the address above which the program command line is placed.
|
.BR PR_SET_MM_ARG_END
|
||||||
.\" .TP
|
Set the address below which the program command line is placed.
|
||||||
.\" .BR PR_SET_MM_ARG_END
|
.TP
|
||||||
.\" Set the address below which the program command line is placed.
|
.BR PR_SET_MM_ENV_START
|
||||||
.\" .TP
|
Set the address above which the program environment is placed.
|
||||||
.\" .BR PR_SET_MM_ENV_START
|
.TP
|
||||||
.\" Set the address above which the program environment is placed.
|
.BR PR_SET_MM_ENV_END
|
||||||
.\" .TP
|
Set the address below which the program environment is placed.
|
||||||
.\" .BR PR_SET_MM_ENV_END
|
.IP
|
||||||
.\" Set the address below which the program environment is placed.
|
The address passed with
|
||||||
.\" .IP
|
.BR PR_SET_MM_ARG_START ,
|
||||||
.\" The address passed with
|
.BR PR_SET_MM_ARG_END ,
|
||||||
.\" .BR PR_SET_MM_ARG_START ,
|
.BR PR_SET_MM_ENV_START ,
|
||||||
.\" .BR PR_SET_MM_ARG_END ,
|
and
|
||||||
.\" .BR PR_SET_MM_ENV_START ,
|
.BR PR_SET_MM_ENV_END
|
||||||
.\" and
|
should belong to a process stack area.
|
||||||
.\" .BR PR_SET_MM_ENV_END
|
Thus, the corresponding memory area must be readable, writable, and
|
||||||
.\" should belong to a process stack area.
|
(depending on the kernel configuration) have the
|
||||||
.\" Thus, the corresponding memory area must be readable, writable, and
|
.BR MAP_GROWSDOWN
|
||||||
.\" (depending on the kernel configuration) have the
|
attribute set (see
|
||||||
.\" .BR MAP_GROWSDOWN
|
.BR mmap (2)).
|
||||||
.\" attribute set (see
|
.TP
|
||||||
.\" .BR mmap (2)).
|
.BR PR_SET_MM_AUXV
|
||||||
.\" .TP
|
Set a new auxiliary vector.
|
||||||
.\" .BR PR_SET_MM_AUXV
|
The
|
||||||
.\" Set a new auxiliary vector.
|
.I arg3
|
||||||
.\" The
|
argument should provide the address of the vector.
|
||||||
.\" .I arg3
|
The
|
||||||
.\" argument should provide the address of the vector.
|
.I arg4
|
||||||
.\" The
|
is the size of the vector.
|
||||||
.\" .I arg4
|
.TP
|
||||||
.\" is the size of the vector.
|
.BR PR_SET_MM_EXE_FILE
|
||||||
.\" .TP
|
Supersede the
|
||||||
.\" .BR PR_SET_MM_EXE_FILE
|
.IR /proc/pid/exe
|
||||||
.\" Supersede the
|
symbolic link with a new one pointing to a new executable file
|
||||||
.\" .IR /proc/pid/exe
|
identified by the file descriptor provided in
|
||||||
.\" symbolic link with a new one pointing to a new executable file
|
.I arg3
|
||||||
.\" identified by the file descriptor provided in
|
argument.
|
||||||
.\" .I arg3
|
The file descriptor should be obtained with a regular
|
||||||
.\" argument.
|
.BR open (2)
|
||||||
.\" The file descriptor should be obtained with a regular
|
call.
|
||||||
.\" .BR open (2)
|
.IP
|
||||||
.\" call.
|
To change the symbolic link, one needs to unmap all existing
|
||||||
.\" .IP
|
executable memory areas, including those created by the kernel itself
|
||||||
.\" To change the symbolic link, one needs to unmap all existing
|
(for example the kernel usually creates at least one executable
|
||||||
.\" executable memory areas, including those created by the kernel itself
|
memory area for the ELF
|
||||||
.\" (for example the kernel usually creates at least one executable
|
.IR \.text
|
||||||
.\" memory area for the ELF
|
section).
|
||||||
.\" .IR \.text
|
.IP
|
||||||
.\" section).
|
The second limitation is that such transitions can be done only once
|
||||||
.\" .IP
|
in a process life time.
|
||||||
.\" The second limitation is that such transitions can be done only once
|
Any further attempts will be rejected.
|
||||||
.\" in a process life time.
|
This should help system administrators to monitor unusual
|
||||||
.\" Any further attempts will be rejected.
|
symbolic-link transitions over all process running in a system.
|
||||||
.\" This should help system administrators to monitor unusual
|
|
||||||
.\" symbolic-link transitions over all process running in a system.
|
|
||||||
.\" ========== END FIXME
|
|
||||||
.RE
|
.RE
|
||||||
.\"
|
.\"
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
|
@ -919,41 +916,38 @@ is
|
||||||
and the caller does not have the
|
and the caller does not have the
|
||||||
.B CAP_SYS_RESOURCE
|
.B CAP_SYS_RESOURCE
|
||||||
capability.
|
capability.
|
||||||
.\" FIXME The following (until ========) is not yet in mainline kernel,
|
.TP
|
||||||
.\" so commented out for the moment.
|
.B EACCES
|
||||||
.\" .TP
|
.I option
|
||||||
.\" .B EACCES
|
is
|
||||||
.\" .I option
|
.BR PR_SET_MM ,
|
||||||
.\" is
|
and
|
||||||
.\" .BR PR_SET_MM ,
|
.I arg3
|
||||||
.\" and
|
is
|
||||||
.\" .I arg3
|
.BR PR_SET_MM_EXE_FILE ,
|
||||||
.\" is
|
the file is not executable.
|
||||||
.\" .BR PR_SET_MM_EXE_FILE ,
|
.TP
|
||||||
.\" the file is not executable.
|
.B EBUSY
|
||||||
.\" .TP
|
.I option
|
||||||
.\" .B EBUSY
|
is
|
||||||
.\" .I option
|
.BR PR_SET_MM ,
|
||||||
.\" is
|
.I arg3
|
||||||
.\" .BR PR_SET_MM ,
|
is
|
||||||
.\" .I arg3
|
.BR PR_SET_MM_EXE_FILE ,
|
||||||
.\" is
|
and this the second attempt to change the
|
||||||
.\" .BR PR_SET_MM_EXE_FILE ,
|
.I /proc/pid/exe
|
||||||
.\" and this the second attempt to change the
|
symbolic link, which is prohibited.
|
||||||
.\" .I /proc/pid/exe
|
.TP
|
||||||
.\" symbolic link, which is prohibited.
|
.B EBADF
|
||||||
.\" .TP
|
.I option
|
||||||
.\" .B EBADF
|
is
|
||||||
.\" .I option
|
.BR PR_SET_MM ,
|
||||||
.\" is
|
.I arg3
|
||||||
.\" .BR PR_SET_MM ,
|
is
|
||||||
.\" .I arg3
|
.BR PR_SET_MM_EXE_FILE ,
|
||||||
.\" is
|
and the file descriptor passed in
|
||||||
.\" .BR PR_SET_MM_EXE_FILE ,
|
.I arg4
|
||||||
.\" and the file descriptor passed in
|
is not valid.
|
||||||
.\" .I arg4
|
|
||||||
.\" is not valid.
|
|
||||||
.\" ========== END FIXME
|
|
||||||
.\" The following can't actually happen, because prctl() in
|
.\" The following can't actually happen, because prctl() in
|
||||||
.\" seccomp mode will cause SIGKILL.
|
.\" seccomp mode will cause SIGKILL.
|
||||||
.\" .TP
|
.\" .TP
|
||||||
|
|
Loading…
Reference in New Issue