Small markup fixes.
This commit is contained in:
parent
d2aaad127e
commit
b84ea9c460
|
@ -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
|
||||
|
|
|
@ -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 .
|
||||
|
|
Loading…
Reference in New Issue