aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/man2/prctl.237
-rw-r--r--man/man2const/PR_SET_VMA.2const74
2 files changed, 77 insertions, 34 deletions
diff --git a/man/man2/prctl.2 b/man/man2/prctl.2
index 087a29ca3e..f2e0b453ef 100644
--- a/man/man2/prctl.2
+++ b/man/man2/prctl.2
@@ -100,40 +100,8 @@ The first argument can be:
.B PR_MCE_KILL_GET
.TQ
.B PR_SET_MM
-.\" prctl PR_SET_VMA
-.TP
-.BR PR_SET_VMA " (since Linux 5.17)"
-.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
-Sets an attribute specified in
-.I arg2
-for virtual memory areas starting from the address specified in
-.I arg3
-and spanning the size specified in
-.IR arg4 .
-.I arg5
-specifies the value of the attribute to be set.
-.IP
-Note that assigning an attribute to a virtual memory area
-might prevent it from being merged with adjacent virtual memory areas
-due to the difference in that attribute's value.
-.IP
-Currently,
-.I arg2
-must be one of:
-.RS
-.TP
-.B PR_SET_VMA_ANON_NAME
-Set a name for anonymous virtual memory areas.
-.I arg5
-should be a pointer to a null-terminated string containing the name.
-The name length including null byte cannot exceed 80 bytes.
-If
-.I arg5
-is NULL, the name of the appropriate anonymous virtual memory areas
-will be reset.
-The name can contain only printable ascii characters (including space),
-except \[aq][\[aq], \[aq]]\[aq], \[aq]\e\[aq], \[aq]$\[aq], and \[aq]\[ga]\[aq].
-.RE
+.TQ
+.B PR_SET_VMA
.\" prctl PR_MPX_ENABLE_MANAGEMENT
.TP
.B PR_MPX_ENABLE_MANAGEMENT
@@ -1697,4 +1665,5 @@ glibc 2.0.6
.BR PR_MCE_KILL (2const),
.BR PR_MCE_KILL_GET (2const),
.BR PR_SET_MM (2const),
+.BR PR_SET_VMA (2const),
.BR core (5)
diff --git a/man/man2const/PR_SET_VMA.2const b/man/man2const/PR_SET_VMA.2const
new file mode 100644
index 0000000000..dd1beb5025
--- /dev/null
+++ b/man/man2const/PR_SET_VMA.2const
@@ -0,0 +1,74 @@
+.\" Copyright 2021, Colin Cross <ccross@google.com>
+.\" Copyright 2023, Nick Gregory <nick@nickgregory.me>
+.\" Copyright 2024, Alejandro Colomar <alx@kernel.org>
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.TH PR_SET_VMA 2const (date) "Linux man-pages (unreleased)"
+.SH NAME
+PR_SET_VMA
+\-
+set an attribute for virtual memory areas
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
+.SH SYNOPSIS
+.nf
+.B #include <sys/prctl.h>
+.P
+.BI "int prctl(int " op ", ...);"
+.fi
+.SH DESCRIPTION
+.TP
+.BR PR_SET_VMA " (since Linux 5.17)"
+.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
+Sets an attribute specified in
+.I arg2
+for virtual memory areas starting from the address specified in
+.I arg3
+and spanning the size specified in
+.IR arg4 .
+.I arg5
+specifies the value of the attribute to be set.
+.IP
+Note that assigning an attribute to a virtual memory area
+might prevent it from being merged with adjacent virtual memory areas
+due to the difference in that attribute's value.
+.IP
+Currently,
+.I arg2
+must be one of:
+.RS
+.TP
+.B PR_SET_VMA_ANON_NAME
+Set a name for anonymous virtual memory areas.
+.I arg5
+should be a pointer to a null-terminated string containing the name.
+The name length including null byte cannot exceed 80 bytes.
+If
+.I arg5
+is NULL, the name of the appropriate anonymous virtual memory areas
+will be reset.
+The name can contain only printable ascii characters (including space),
+except \[aq][\[aq], \[aq]]\[aq], \[aq]\e\[aq], \[aq]$\[aq], and \[aq]\[ga]\[aq].
+.RE
+.SH RETURN VALUE
+On success,
+0 is returned.
+On error, \-1 is returned, and
+.I errno
+is set to indicate the error.
+.SH ERRORS
+.TP
+.B EINVAL
+.I arg2
+is not a valid value.
+.TP
+.B EINVAL
+.I arg3
+is an invalid address.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.SH SEE ALSO
+.BR prctl (2)