diff options
| -rw-r--r-- | man/man2const/PR_GET_TAGGED_ADDR_CTRL.2const | 58 |
1 files changed, 18 insertions, 40 deletions
diff --git a/man/man2const/PR_GET_TAGGED_ADDR_CTRL.2const b/man/man2const/PR_GET_TAGGED_ADDR_CTRL.2const index 0fa22307a1..7741c33f8e 100644 --- a/man/man2const/PR_GET_TAGGED_ADDR_CTRL.2const +++ b/man/man2const/PR_GET_TAGGED_ADDR_CTRL.2const @@ -1,5 +1,6 @@ .\" Copyright 2020, Dave Martin <Dave.Martin@arm.com> .\" Copyright 2020, Michael Kerrisk <mtk.manpages@gmail.com> +.\" Copyright 2024, Alejandro Colomar <alx@kernel.org> .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" @@ -15,64 +16,41 @@ Standard C library .nf .B #include <sys/prctl.h> .P -.BI "int prctl(int " op ", ...);" +.B int prctl(PR_GET_TAGGED_ADDR_CTRL, 0L, 0L, 0L, 0L); .fi .SH DESCRIPTION -.\" prctl PR_GET_TAGGED_ADDR_CTRL -.\" commit 63f0c60379650d82250f22e4cf4137ef3dc4f43d -.TP -.BR PR_GET_TAGGED_ADDR_CTRL " (since Linux 5.4, only on arm64)" Returns the current tagged address mode for the calling thread. -.IP -Arguments -.IR arg2 ", " arg3 ", " arg4 ", and " arg5 -must all be zero. -.IP -If the arguments are invalid -or this feature is disabled or unsupported by the kernel, -the call fails with -.BR EINVAL . -In particular, if -.BR prctl ( PR_GET_TAGGED_ADDR_CTRL , -0, 0, 0, 0) -fails with -.BR EINVAL , -then this feature is definitely either unsupported, -or disabled via -.IR /proc/sys/abi/tagged_addr_disabled . -In this case, -all addresses passed to the kernel must be untagged. -.IP -Otherwise, the call returns a nonnegative value +.P +The call returns a nonnegative value describing the current tagged address mode, encoded in the same way as the -.I arg2 +.I mode argument of .BR PR_SET_TAGGED_ADDR_CTRL (2const). -.IP -For more information, see the kernel source file -.IR Documentation/arm64/tagged\-address\-abi.rst . .SH RETURN VALUE On success, -.BR PR_GET_TAGGED_ADDR_CTRL , -return the nonnegative values described above. +this call +returns the nonnegative value described above. On error, \-1 is returned, and .I errno is set to indicate the error. .SH ERRORS +This feature is disabled or unsupported by the kernel, +or disabled via +.IR \%/proc/\:sys/\:abi/\:tagged_addr_disabled . +.SH FILES .TP -.B EINVAL -.I op -is -.B PR_GET_TAGGED_ADDR_CTRL -and the arguments are invalid or unsupported. -See the description of -.B PR_GET_TAGGED_ADDR_CTRL -above for details. +.I \%/proc/\:sys/\:abi/\:tagged_addr_disabled .SH STANDARDS Linux. +arm64 only. .SH HISTORY +.\" commit 63f0c60379650d82250f22e4cf4137ef3dc4f43d +Linux 5.4 (arm64). .SH SEE ALSO .BR prctl (2), .BR PR_SET_TAGGED_ADDR_CTRL (2const) +.P +For more information, see the kernel source file +.IR \%Documentation/\:arm64/\:tagged\-address\-abi.rst . |
