Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156715089
D23843.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D23843.diff
View Options
Index: head/lib/libc/sys/mmap.2
===================================================================
--- head/lib/libc/sys/mmap.2
+++ head/lib/libc/sys/mmap.2
@@ -28,7 +28,7 @@
.\" @(#)mmap.2 8.4 (Berkeley) 5/11/95
.\" $FreeBSD$
.\"
-.Dd June 20, 2019
+.Dd February 26, 2020
.Dt MMAP 2
.Os
.Sh NAME
@@ -432,11 +432,6 @@
.Fa prot
argument.
.It Bq Er EINVAL
-The
-.Fa prot
-argument contains permissions which are not a subset of the specified
-maximum permissions.
-.It Bq Er EINVAL
An undefined option was set in the
.Fa flags
argument.
@@ -530,6 +525,11 @@
argument was not available.
.Dv MAP_ANON
was specified and insufficient memory was available.
+.It Bq Er ENOTSUP
+The
+.Fa prot
+argument contains permissions which are not a subset of the specified
+maximum permissions.
.El
.Sh SEE ALSO
.Xr madvise 2 ,
Index: head/lib/libc/sys/mprotect.2
===================================================================
--- head/lib/libc/sys/mprotect.2
+++ head/lib/libc/sys/mprotect.2
@@ -28,7 +28,7 @@
.\" @(#)mprotect.2 8.1 (Berkeley) 6/9/93
.\" $FreeBSD$
.\"
-.Dd June 20, 2019
+.Dd February 26, 2020
.Dt MPROTECT 2
.Os
.Sh NAME
@@ -104,7 +104,7 @@
The
.Fa prot
argument contains unhandled bits.
-.It Bq Er EINVAL
+.It Bq Er ENOTSUP
The
.Fa prot
argument contains permissions which are not a subset of the specified
Index: head/sys/vm/vm_mmap.c
===================================================================
--- head/sys/vm/vm_mmap.c
+++ head/sys/vm/vm_mmap.c
@@ -225,7 +225,7 @@
max_prot = PROT_MAX_EXTRACT(prot);
prot = PROT_EXTRACT(prot);
if (max_prot != 0 && (max_prot & prot) != prot)
- return (EINVAL);
+ return (ENOTSUP);
p = td->td_proc;
@@ -668,7 +668,7 @@
vm_error = KERN_SUCCESS;
if (max_prot != 0) {
if ((max_prot & prot) != prot)
- return (EINVAL);
+ return (ENOTSUP);
vm_error = vm_map_protect(&td->td_proc->p_vmspace->vm_map,
addr, addr + size, max_prot, TRUE);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 8:51 PM (8 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33152323
Default Alt Text
D23843.diff (1 KB)
Attached To
Mode
D23843: Return ENOTSUP for mmap/mprotect with prot not subset of prot_max
Attached
Detach File
Event Timeline
Log In to Comment