From b84ea9c46026965897307f1876ff9746184736ec Mon Sep 17 00:00:00 2001 From: uwe Date: Wed, 19 Jun 2019 20:20:52 +0000 Subject: [PATCH] Small markup fixes. --- lib/libc/sys/mmap.2 | 17 ++++++++++------- lib/libc/sys/mprotect.2 | 10 +++++----- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2 index 010cb6b3158c..736317edcf79 100644 --- a/lib/libc/sys/mmap.2 +++ b/lib/libc/sys/mmap.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: mmap.2,v 1.52 2018/05/02 16:00:20 christos Exp $ +.\" $NetBSD: mmap.2,v 1.53 2019/06/19 20:20:52 uwe Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -68,7 +68,7 @@ If is zero, an address will be selected by the system. The actual starting address of the region is returned. A successful -.Fa mmap +.Nm deletes any previous mapping in the allocated address range. .Pp The protections (region accessibility) are specified in the @@ -184,7 +184,9 @@ specified. If the specified address cannot be used, .Nm mmap will fail. -If MAP_FIXED is specified, +If +.Dv MAP_FIXED +is specified, .Fa addr must be a multiple of the pagesize. Use of this option is discouraged. @@ -225,7 +227,7 @@ had not been specified. If .Fa addr is -.Fa NULL , +.Dv NULL , this flag is ignored and the system will select a mapping address. .It Dv MAP_WIRED Lock the mapped region into memory as with @@ -270,7 +272,7 @@ is set to indicate the error. The symbol .Dv MAP_FAILED is defined in the header -.Ao Pa sys/mman.h Ac . +.In sys/mman.h . No successful return from .Fn mmap will return the value @@ -300,7 +302,7 @@ parameters and .Fa fd was not open for writing. .Pp -PAX mprotect restrictions prohibit the requested protection. +PaX mprotect restrictions prohibit the requested protection. .It Bq Er EBADF .Fa fd is not a valid open file descriptor. @@ -318,7 +320,8 @@ was specified and the parameter was not page aligned or was outside of the valid address range for a process. .Pp -.Dv MAP_ANON was specified and +.Dv MAP_ANON +was specified and .Fa fd was not \-1. .It Bq Er ENODEV diff --git a/lib/libc/sys/mprotect.2 b/lib/libc/sys/mprotect.2 index be8e2fb7bda6..9e00fd5d5641 100644 --- a/lib/libc/sys/mprotect.2 +++ b/lib/libc/sys/mprotect.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: mprotect.2,v 1.26 2017/05/14 12:30:37 wiz Exp $ +.\" $NetBSD: mprotect.2,v 1.27 2019/06/19 20:28:36 uwe Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -43,7 +43,7 @@ .Fn mprotect "void *addr" "size_t len" "int prot" .Sh DESCRIPTION The -.Fn mprotect +.Nm system call changes the specified pages to have protection .Fa prot . @@ -56,7 +56,7 @@ argument by .Tn OR Ns 'ing the following values: .Pp -.Bl -tag -width MAP_FIXEDX -offset indent +.Bl -tag -width "Dv MAP_WRITE" -offset indent .It Dv PROT_EXEC Pages may be executed. .It Dv PROT_READ @@ -87,7 +87,7 @@ The new protection is less restrictive than the protection originally set with .Xr mmap 2 . .Pp -PAX mprotect restrictions prohibit the requested protection. +PaX mprotect restrictions prohibit the requested protection. .It Bq Er EINVAL An invalid memory range, or invalid parameters were provided. .It Bq Er ENOMEM @@ -101,6 +101,6 @@ A resource shortage occurred while internally calling .Xr munmap 2 .Sh HISTORY The -.Fn mprotect +.Nm function first appeared in .Bx 4.4 .