diff options
| author | Alejandro Colomar <alx@kernel.org> | 2024-05-29 13:32:25 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2024-05-31 01:42:37 +0200 |
| commit | 020ebc659266ce6a941ae93419b61def667fb71b (patch) | |
| tree | a43d24b6ea70b705365004c7d901dbb02ca6f318 | |
| parent | 4edc43fedb33ff7eb51b83878059fda3d870eb61 (diff) | |
| download | man-pages-020ebc659266ce6a941ae93419b61def667fb71b.tar.gz | |
prctl.2, PR_SET_VMA.2const: Split PR_SET_VMA from prctl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rw-r--r-- | man/man2/prctl.2 | 37 | ||||
| -rw-r--r-- | man/man2const/PR_SET_VMA.2const | 74 |
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) |
