summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/mmap.2
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2010-03-23 21:08:07 +0000
committerjhb <jhb@FreeBSD.org>2010-03-23 21:08:07 +0000
commit399c01844ad297de82f83cc99f989358723baf51 (patch)
treef24618d081cc374b0fccc722d1b306336d6a1030 /lib/libc/sys/mmap.2
parentd34fe86cb588bb8f80548a0a68036135b45eb07f (diff)
downloadFreeBSD-src-399c01844ad297de82f83cc99f989358723baf51.zip
FreeBSD-src-399c01844ad297de82f83cc99f989358723baf51.tar.gz
Reject attempts to create a MAP_ANON mapping with a non-zero offset.
PR: kern/71258 Submitted by: Alexander Best MFC after: 2 weeks
Diffstat (limited to 'lib/libc/sys/mmap.2')
-rw-r--r--lib/libc/sys/mmap.27
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2
index 4849973..b633cb1 100644
--- a/lib/libc/sys/mmap.2
+++ b/lib/libc/sys/mmap.2
@@ -105,7 +105,7 @@ The file descriptor used for creating
must be \-1.
The
.Fa offset
-argument is ignored.
+argument must be 0.
.\".It Dv MAP_FILE
.\"Mapped from a regular file or character-special device memory.
.It Dv MAP_ANONYMOUS
@@ -316,6 +316,11 @@ was equal to zero.
was specified and the
.Fa fd
argument was not -1.
+.It Bq Er EINVAL
+.Dv MAP_ANON
+was specified and the
+.Fa offset
+argument was not 0.
.It Bq Er ENODEV
.Dv MAP_ANON
has not been specified and
OpenPOWER on IntegriCloud