prctl.2: Minor fixes to Dave Martin's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2020-06-26 13:21:15 +02:00
parent 9b276f9ea8
commit 236a9f706a
1 changed files with 9 additions and 8 deletions

View File

@ -2,6 +2,7 @@
.\" and Copyright (C) 2002, 2006, 2008, 2012, 2013 Michael Kerrisk <mtk.manpages@gmail.com> .\" and Copyright (C) 2002, 2006, 2008, 2012, 2013 Michael Kerrisk <mtk.manpages@gmail.com>
.\" and Copyright Guillem Jover <guillem@hadrons.org> .\" and Copyright Guillem Jover <guillem@hadrons.org>
.\" and Copyright (C) 2014 Dave Hansen / Intel .\" and Copyright (C) 2014 Dave Hansen / Intel
.\" and Copyright (c) 2020 Dave Martin <Dave.Martin@arm.com>
.\" .\"
.\" %%%LICENSE_START(VERBATIM) .\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this .\" Permission is granted to make and distribute verbatim copies of this
@ -1526,7 +1527,7 @@ before Linux 5.3).
.\" commit 63f0c60379650d82250f22e4cf4137ef3dc4f43d .\" commit 63f0c60379650d82250f22e4cf4137ef3dc4f43d
.TP .TP
.BR PR_SET_TAGGED_ADDR_CTRL " (since Linux 5.4, only on arm64)" .BR PR_SET_TAGGED_ADDR_CTRL " (since Linux 5.4, only on arm64)"
Controls support for passing tagged userspace addresses to the kernel Controls support for passing tagged user-space addresses to the kernel
(i.e., addresses where bits 56\(em63 are not all zero). (i.e., addresses where bits 56\(em63 are not all zero).
.IP .IP
The level of support is selected by The level of support is selected by
@ -1546,7 +1547,7 @@ may be tagged, with the exceptions summarized below.
.RE .RE
.IP .IP
The remaining arguments The remaining arguments
.IR arg3 ", " arg4 " and " arg5 .IR arg3 ", " arg4 ", and " arg5
must all be zero. must all be zero.
.\" Enforcement added in .\" Enforcement added in
.\" commit 3e91ec89f527b9870fe42dcbdb74fd389d123a95 .\" commit 3e91ec89f527b9870fe42dcbdb74fd389d123a95
@ -1561,21 +1562,21 @@ is unrecognized,
or if this feature is unsupported by the kernel or if this feature is unsupported by the kernel
or disabled via or disabled via
.IR /proc/sys/abi/tagged_addr_disabled , .IR /proc/sys/abi/tagged_addr_disabled ,
the call fails with the call fails with the error
.BR EINVAL . .BR EINVAL .
.IP .IP
In particular, if In particular, if
.BR prctl ( PR_SET_TAGGED_ADDR_CTRL , .BR prctl ( PR_SET_TAGGED_ADDR_CTRL ,
0, 0, 0, 0) 0, 0, 0, 0)
fails with fails with
.B EINVAL .BR EINVAL ,
then all addresses passed to the kernel must be untagged. then all addresses passed to the kernel must be untagged.
.IP .IP
Irrespective of which mode is set, Irrespective of which mode is set,
addresses passed to certain interfaces addresses passed to certain interfaces
must always be untagged: must always be untagged:
.RS .RS
.IP \(em .IP \(bu 2
.BR brk (2), .BR brk (2),
.BR mmap (2), .BR mmap (2),
.BR shmat (2), .BR shmat (2),
@ -1588,7 +1589,7 @@ argument of
(Prior to Linux 5.6 these accepted tagged addresses, (Prior to Linux 5.6 these accepted tagged addresses,
but the behaviour may not be what you expect. but the behaviour may not be what you expect.
Don't rely on it.) Don't rely on it.)
.IP \(em .IP \(bu
\(oqpolymorphic\(cq interfaces \(oqpolymorphic\(cq interfaces
that accept pointers to arbitrary types cast to a that accept pointers to arbitrary types cast to a
.I void * .I void *
@ -1627,7 +1628,7 @@ This call is primarily intended for use by the run-time environment.
A successful A successful
.B PR_SET_TAGGED_ADDR_CTRL .B PR_SET_TAGGED_ADDR_CTRL
call elsewhere may crash the calling process. call elsewhere may crash the calling process.
The conditions for using it safely are complex and system-dependent; The conditions for using it safely are complex and system-dependent.
Don't use it unless you know what you are doing. Don't use it unless you know what you are doing.
.\" prctl PR_GET_TAGGED_ADDR_CTRL .\" prctl PR_GET_TAGGED_ADDR_CTRL
.\" commit 63f0c60379650d82250f22e4cf4137ef3dc4f43d .\" commit 63f0c60379650d82250f22e4cf4137ef3dc4f43d
@ -1637,7 +1638,7 @@ Returns the current tagged address mode
for the calling thread. for the calling thread.
.IP .IP
Arguments Arguments
.IR arg2 ", " arg3 ", " arg4 " and " arg5 .IR arg2 ", " arg3 ", " arg4 ", and " arg5
must all be zero. must all be zero.
.IP .IP
If the arguments are invalid If the arguments are invalid