From 236a9f706aed3faf1646c39f38bb62dc0ad06a71 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 26 Jun 2020 13:21:15 +0200 Subject: [PATCH] prctl.2: Minor fixes to Dave Martin's patch Signed-off-by: Michael Kerrisk --- man2/prctl.2 | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/man2/prctl.2 b/man2/prctl.2 index 313ff3746..534306285 100644 --- a/man2/prctl.2 +++ b/man2/prctl.2 @@ -2,6 +2,7 @@ .\" and Copyright (C) 2002, 2006, 2008, 2012, 2013 Michael Kerrisk .\" and Copyright Guillem Jover .\" and Copyright (C) 2014 Dave Hansen / Intel +.\" and Copyright (c) 2020 Dave Martin .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this @@ -1526,7 +1527,7 @@ before Linux 5.3). .\" commit 63f0c60379650d82250f22e4cf4137ef3dc4f43d .TP .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). .IP The level of support is selected by @@ -1546,7 +1547,7 @@ may be tagged, with the exceptions summarized below. .RE .IP The remaining arguments -.IR arg3 ", " arg4 " and " arg5 +.IR arg3 ", " arg4 ", and " arg5 must all be zero. .\" Enforcement added in .\" commit 3e91ec89f527b9870fe42dcbdb74fd389d123a95 @@ -1561,21 +1562,21 @@ is unrecognized, or if this feature is unsupported by the kernel or disabled via .IR /proc/sys/abi/tagged_addr_disabled , -the call fails with +the call fails with the error .BR EINVAL . .IP In particular, if .BR prctl ( PR_SET_TAGGED_ADDR_CTRL , 0, 0, 0, 0) fails with -.B EINVAL +.BR EINVAL , then all addresses passed to the kernel must be untagged. .IP Irrespective of which mode is set, addresses passed to certain interfaces must always be untagged: .RS -.IP \(em +.IP \(bu 2 .BR brk (2), .BR mmap (2), .BR shmat (2), @@ -1588,7 +1589,7 @@ argument of (Prior to Linux 5.6 these accepted tagged addresses, but the behaviour may not be what you expect. Don't rely on it.) -.IP \(em +.IP \(bu \(oqpolymorphic\(cq interfaces that accept pointers to arbitrary types cast to a .I void * @@ -1627,7 +1628,7 @@ This call is primarily intended for use by the run-time environment. A successful .B PR_SET_TAGGED_ADDR_CTRL 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. .\" prctl PR_GET_TAGGED_ADDR_CTRL .\" commit 63f0c60379650d82250f22e4cf4137ef3dc4f43d @@ -1637,7 +1638,7 @@ Returns the current tagged address mode for the calling thread. .IP Arguments -.IR arg2 ", " arg3 ", " arg4 " and " arg5 +.IR arg2 ", " arg3 ", " arg4 ", and " arg5 must all be zero. .IP If the arguments are invalid