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
|
||||
.BR PR_SET_MM_START_BRK
|
||||
option.
|
||||
.\" 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
|
||||
.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.
|
||||
.RE
|
||||
.\"
|
||||
.SH RETURN VALUE
|
||||
|
@ -919,41 +916,38 @@ is
|
|||
and the caller does not have the
|
||||
.B CAP_SYS_RESOURCE
|
||||
capability.
|
||||
.\" 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
|
||||
.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.
|
||||
.\" The following can't actually happen, because prctl() in
|
||||
.\" seccomp mode will cause SIGKILL.
|
||||
.\" .TP
|
||||
|
|
Loading…
Reference in New Issue