* [PATCH 1/3] prctl(2): PR_SET_MM: document arg4/arg5 zero behavior
@ 2017-02-15 20:14 Mike Frysinger
[not found] ` <20170215201443.448-1-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2017-02-15 20:14 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, Mike Frysinger
The kernel will immediately reject calls where arg4/arg5 are not zero.
See kernel/sys.c:prctl_set_mm().
Signed-off-by: Mike Frysinger <vapier-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
man2/prctl.2 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/man2/prctl.2 b/man2/prctl.2
index 97cf21a4c558..c91d328e5aa1 100644
--- a/man2/prctl.2
+++ b/man2/prctl.2
@@ -515,6 +515,11 @@ The value in
is one of the options below, while
.I arg3
provides a new value for the option.
+The
+.I arg4
+and
+.I arg5
+arguments must be zero if unused.
.RS
.TP
.BR PR_SET_MM_START_CODE
--
2.11.0
--
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] prctl(2): PR_SET_MM: document new PR_SET_MM_MAP{,_SIZE} helpers
[not found] ` <20170215201443.448-1-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
@ 2017-02-15 20:14 ` Mike Frysinger
[not found] ` <20170215201443.448-2-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2017-02-15 20:14 ` [PATCH 3/3] prctl(2): PR_SET_MM: refine CONFIG_CHECKPOINT_RESTORE requirement Mike Frysinger
2017-04-19 13:31 ` [PATCH 1/3] prctl(2): PR_SET_MM: document arg4/arg5 zero behavior Michael Kerrisk (man-pages)
2 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2017-02-15 20:14 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, Mike Frysinger
Signed-off-by: Mike Frysinger <vapier-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
man2/prctl.2 | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/man2/prctl.2 b/man2/prctl.2
index c91d328e5aa1..dba32ebee1b5 100644
--- a/man2/prctl.2
+++ b/man2/prctl.2
@@ -633,6 +633,34 @@ in a process life time.
Any further attempts will be rejected.
This should help system administrators monitor unusual
symbolic-link transitions over all processes running on a system.
+.P
+The following options are available since Linux 3.18.
+.\" commit f606b77f1a9e362451aca8f81d8f36a3a112139e
+.TP
+.BR PR_SET_MM_MAP
+Provides one-shot access to all the addresses by passing in a
+.I struct prctl_mm_map
+(as defined in \fI<linux/prctl.h>\fP).
+The
+.I arg4
+argument should provide the size of the struct.
+
+This feature is available only if the kernel is built with the
+.BR CONFIG_CHECKPOINT_RESTORE
+option enabled.
+.TP
+.BR PR_SET_MM_MAP_SIZE
+Returns the size of the
+.I struct prctl_mm_map
+the kernel expects.
+This allows user space to find a compatible struct.
+The
+.I arg4
+argument should be a pointer to an unsigned int.
+
+This feature is available only if the kernel is built with the
+.BR CONFIG_CHECKPOINT_RESTORE
+option enabled.
.RE
.TP
.BR PR_MPX_ENABLE_MANAGEMENT ", " PR_MPX_DISABLE_MANAGEMENT " (since Linux 3.19) "
--
2.11.0
--
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] prctl(2): PR_SET_MM: refine CONFIG_CHECKPOINT_RESTORE requirement
[not found] ` <20170215201443.448-1-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2017-02-15 20:14 ` [PATCH 2/3] prctl(2): PR_SET_MM: document new PR_SET_MM_MAP{,_SIZE} helpers Mike Frysinger
@ 2017-02-15 20:14 ` Mike Frysinger
[not found] ` <20170215201443.448-3-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2017-04-19 13:31 ` [PATCH 1/3] prctl(2): PR_SET_MM: document arg4/arg5 zero behavior Michael Kerrisk (man-pages)
2 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2017-02-15 20:14 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, Mike Frysinger
The Linux 3.10 release dropped the c/r requirement and opened it up
to all users.
Signed-off-by: Mike Frysinger <vapier-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
man2/prctl.2 | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/man2/prctl.2 b/man2/prctl.2
index dba32ebee1b5..42827aa2def4 100644
--- a/man2/prctl.2
+++ b/man2/prctl.2
@@ -504,9 +504,7 @@ Usually these fields are set by the kernel and dynamic loader (see
for more information) and a regular application should not use this feature.
However, there are cases, such as self-modifying programs,
where a program might find it useful to change its own memory map.
-This feature is available only if the kernel is built with the
-.BR CONFIG_CHECKPOINT_RESTORE
-option enabled.
+
The calling process must have the
.BR CAP_SYS_RESOURCE
capability.
@@ -520,6 +518,14 @@ The
and
.I arg5
arguments must be zero if unused.
+
+.\" commit 52b3694157e3aa6df871e283115652ec6f2d31e0
+Since Linux 3.10,
+this feature is available all the time.
+Before Linux 3.10,
+this feature is available only if the kernel is built with the
+.BR CONFIG_CHECKPOINT_RESTORE
+option enabled.
.RS
.TP
.BR PR_SET_MM_START_CODE
--
2.11.0
--
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] prctl(2): PR_SET_MM: document arg4/arg5 zero behavior
[not found] ` <20170215201443.448-1-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2017-02-15 20:14 ` [PATCH 2/3] prctl(2): PR_SET_MM: document new PR_SET_MM_MAP{,_SIZE} helpers Mike Frysinger
2017-02-15 20:14 ` [PATCH 3/3] prctl(2): PR_SET_MM: refine CONFIG_CHECKPOINT_RESTORE requirement Mike Frysinger
@ 2017-04-19 13:31 ` Michael Kerrisk (man-pages)
2 siblings, 0 replies; 6+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-04-19 13:31 UTC (permalink / raw)
To: Mike Frysinger
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
linux-man-u79uwXL29TY76Z2rM5mHXA, Mike Frysinger
On 02/15/2017 09:14 PM, Mike Frysinger wrote:
> The kernel will immediately reject calls where arg4/arg5 are not zero.
> See kernel/sys.c:prctl_set_mm().
Thanks, Mike. Applied.
Cheers,
Michael
> Signed-off-by: Mike Frysinger <vapier-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> ---
> man2/prctl.2 | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/man2/prctl.2 b/man2/prctl.2
> index 97cf21a4c558..c91d328e5aa1 100644
> --- a/man2/prctl.2
> +++ b/man2/prctl.2
> @@ -515,6 +515,11 @@ The value in
> is one of the options below, while
> .I arg3
> provides a new value for the option.
> +The
> +.I arg4
> +and
> +.I arg5
> +arguments must be zero if unused.
> .RS
> .TP
> .BR PR_SET_MM_START_CODE
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] prctl(2): PR_SET_MM: document new PR_SET_MM_MAP{,_SIZE} helpers
[not found] ` <20170215201443.448-2-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
@ 2017-04-19 13:33 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 6+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-04-19 13:33 UTC (permalink / raw)
To: Mike Frysinger
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
linux-man-u79uwXL29TY76Z2rM5mHXA, Mike Frysinger
On 02/15/2017 09:14 PM, Mike Frysinger wrote:
> Signed-off-by: Mike Frysinger <vapier-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Thanks, Mike. Applied.
Cheers,
Michael
> ---
> man2/prctl.2 | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/man2/prctl.2 b/man2/prctl.2
> index c91d328e5aa1..dba32ebee1b5 100644
> --- a/man2/prctl.2
> +++ b/man2/prctl.2
> @@ -633,6 +633,34 @@ in a process life time.
> Any further attempts will be rejected.
> This should help system administrators monitor unusual
> symbolic-link transitions over all processes running on a system.
> +.P
> +The following options are available since Linux 3.18.
> +.\" commit f606b77f1a9e362451aca8f81d8f36a3a112139e
> +.TP
> +.BR PR_SET_MM_MAP
> +Provides one-shot access to all the addresses by passing in a
> +.I struct prctl_mm_map
> +(as defined in \fI<linux/prctl.h>\fP).
> +The
> +.I arg4
> +argument should provide the size of the struct.
> +
> +This feature is available only if the kernel is built with the
> +.BR CONFIG_CHECKPOINT_RESTORE
> +option enabled.
> +.TP
> +.BR PR_SET_MM_MAP_SIZE
> +Returns the size of the
> +.I struct prctl_mm_map
> +the kernel expects.
> +This allows user space to find a compatible struct.
> +The
> +.I arg4
> +argument should be a pointer to an unsigned int.
> +
> +This feature is available only if the kernel is built with the
> +.BR CONFIG_CHECKPOINT_RESTORE
> +option enabled.
> .RE
> .TP
> .BR PR_MPX_ENABLE_MANAGEMENT ", " PR_MPX_DISABLE_MANAGEMENT " (since Linux 3.19) "
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] prctl(2): PR_SET_MM: refine CONFIG_CHECKPOINT_RESTORE requirement
[not found] ` <20170215201443.448-3-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
@ 2017-04-19 13:34 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 6+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-04-19 13:34 UTC (permalink / raw)
To: Mike Frysinger
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
linux-man-u79uwXL29TY76Z2rM5mHXA, Mike Frysinger
On 02/15/2017 09:14 PM, Mike Frysinger wrote:
> The Linux 3.10 release dropped the c/r requirement and opened it up
> to all users.
Thanks, Mike. Applied.
Cheers,
Michael
> Signed-off-by: Mike Frysinger <vapier-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> ---
> man2/prctl.2 | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/man2/prctl.2 b/man2/prctl.2
> index dba32ebee1b5..42827aa2def4 100644
> --- a/man2/prctl.2
> +++ b/man2/prctl.2
> @@ -504,9 +504,7 @@ Usually these fields are set by the kernel and dynamic loader (see
> for more information) and a regular application should not use this feature.
> However, there are cases, such as self-modifying programs,
> where a program might find it useful to change its own memory map.
> -This feature is available only if the kernel is built with the
> -.BR CONFIG_CHECKPOINT_RESTORE
> -option enabled.
> +
> The calling process must have the
> .BR CAP_SYS_RESOURCE
> capability.
> @@ -520,6 +518,14 @@ The
> and
> .I arg5
> arguments must be zero if unused.
> +
> +.\" commit 52b3694157e3aa6df871e283115652ec6f2d31e0
> +Since Linux 3.10,
> +this feature is available all the time.
> +Before Linux 3.10,
> +this feature is available only if the kernel is built with the
> +.BR CONFIG_CHECKPOINT_RESTORE
> +option enabled.
> .RS
> .TP
> .BR PR_SET_MM_START_CODE
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-04-19 13:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 20:14 [PATCH 1/3] prctl(2): PR_SET_MM: document arg4/arg5 zero behavior Mike Frysinger
[not found] ` <20170215201443.448-1-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2017-02-15 20:14 ` [PATCH 2/3] prctl(2): PR_SET_MM: document new PR_SET_MM_MAP{,_SIZE} helpers Mike Frysinger
[not found] ` <20170215201443.448-2-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2017-04-19 13:33 ` Michael Kerrisk (man-pages)
2017-02-15 20:14 ` [PATCH 3/3] prctl(2): PR_SET_MM: refine CONFIG_CHECKPOINT_RESTORE requirement Mike Frysinger
[not found] ` <20170215201443.448-3-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2017-04-19 13:34 ` Michael Kerrisk (man-pages)
2017-04-19 13:31 ` [PATCH 1/3] prctl(2): PR_SET_MM: document arg4/arg5 zero behavior Michael Kerrisk (man-pages)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.