diff options
| author | Nick Gregory <nick@nickgregory.me> | 2023-01-07 22:19:49 +0000 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2023-01-11 00:00:04 +0100 |
| commit | b3d38b5c2f99cda8e0ecdf2ca2a5d21967f65517 (patch) | |
| tree | e4ff52fe1421eaaca6b2e388b395f4cec4e66969 | |
| parent | ac705d1f25098de438fb91619c1f4513119aad33 (diff) | |
| download | man-pages-b3d38b5c2f99cda8e0ecdf2ca2a5d21967f65517.tar.gz | |
prctl.2, proc.5: Document VMA naming
Bring in man page changes from the patch set by Colin Cross, and
document the corresponding virtual names in procfs.
Link: <https://lore.kernel.org/linux-mm/20211019215511.3771969-2-surenb@google.com/>
Signed-off-by: Nick Gregory <nick@nickgregory.me>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Cc: Colin Cross <ccross@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Pasha Tatashin <tatashin@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rw-r--r-- | man2/prctl.2 | 34 | ||||
| -rw-r--r-- | man5/proc.5 | 14 |
2 files changed, 48 insertions, 0 deletions
diff --git a/man2/prctl.2 b/man2/prctl.2 index aa5c752633..368436bad4 100644 --- a/man2/prctl.2 +++ b/man2/prctl.2 @@ -769,6 +769,40 @@ This feature is available only if the kernel is built with the .B CONFIG_CHECKPOINT_RESTORE option enabled. .RE +.\" 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 .\" prctl PR_MPX_ENABLE_MANAGEMENT .TP .BR PR_MPX_ENABLE_MANAGEMENT ", " PR_MPX_DISABLE_MANAGEMENT " (since Linux 3.19, removed in Linux 5.4; only on x86)" diff --git a/man5/proc.5 b/man5/proc.5 index 0986959c84..194b457ece 100644 --- a/man5/proc.5 +++ b/man5/proc.5 @@ -1372,6 +1372,20 @@ See .TP .I [heap] The process's heap. +.TP +.IR [anon: name ] " (since Linux 5.17)" +.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b +A named private anonymous mapping. +Set with +.BR prctl (2) +.BR PR_SET_VMA_ANON_NAME . +.TP +.IR [anon_shmem: name ] " (since Linux 6.2)" +.\" Commit d09e8ca6cb93bb4b97517a18fbbf7eccb0e9ff43 +A named shared anonymous mapping. +Set with +.BR prctl (2) +.BR PR_SET_VMA_ANON_NAME . .in .RE .IP |
