summaryrefslogtreecommitdiffstats
path: root/man2/pkey_alloc.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/pkey_alloc.2')
-rw-r--r--man2/pkey_alloc.214
1 files changed, 7 insertions, 7 deletions
diff --git a/man2/pkey_alloc.2 b/man2/pkey_alloc.2
index 53d8f2a..5d72fb9 100644
--- a/man2/pkey_alloc.2
+++ b/man2/pkey_alloc.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pkey_alloc 2 2023-03-30 "Linux man-pages 6.05.01"
+.TH pkey_alloc 2 2023-10-31 "Linux man-pages 6.7"
.SH NAME
pkey_alloc, pkey_free \- allocate or free a protection key
.SH LIBRARY
@@ -12,7 +12,7 @@ Standard C library
.nf
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <sys/mman.h>
-.PP
+.P
.BI "int pkey_alloc(unsigned int " flags ", unsigned int " access_rights ");"
.BI "int pkey_free(int " pkey ");"
.fi
@@ -20,12 +20,12 @@ Standard C library
.BR pkey_alloc ()
allocates a protection key (pkey) and allows it to be passed to
.BR pkey_mprotect (2).
-.PP
+.P
The
.BR pkey_alloc ()
.I flags
is reserved for future use and currently must always be specified as 0.
-.PP
+.P
The
.BR pkey_alloc ()
.I access_rights
@@ -36,13 +36,13 @@ Disable all data access to memory covered by the returned protection key.
.TP
.B PKEY_DISABLE_WRITE
Disable write access to memory covered by the returned protection key.
-.PP
+.P
.BR pkey_free ()
frees a protection key and makes it available for later
allocations.
After a protection key has been freed, it may no longer be used
in any protection-key-related operations.
-.PP
+.P
An application should not call
.BR pkey_free ()
on any protection key which has been assigned to an address
@@ -96,7 +96,7 @@ It can be used in lieu of any other mechanism for detecting pkey support
and will simply fail with the error
.B ENOSPC
if the operating system has no pkey support.
-.PP
+.P
The kernel guarantees that the contents of the hardware rights
register (PKRU) will be preserved only for allocated protection
keys.