Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110774892
D16822.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
D16822.diff
View Options
Index: head/lib/libvmmapi/vmmapi.c
===================================================================
--- head/lib/libvmmapi/vmmapi.c
+++ head/lib/libvmmapi/vmmapi.c
@@ -362,7 +362,7 @@
size_t objsize, len;
vm_paddr_t gpa;
char *baseaddr, *ptr;
- int error, flags;
+ int error;
assert(vms == VM_MMAP_ALL);
@@ -389,8 +389,7 @@
* and the adjoining guard regions.
*/
len = VM_MMAP_GUARD_SIZE + objsize + VM_MMAP_GUARD_SIZE;
- flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE | MAP_ALIGNED_SUPER;
- ptr = mmap(NULL, len, PROT_NONE, flags, -1, 0);
+ ptr = mmap(NULL, len, PROT_NONE, MAP_GUARD | MAP_ALIGNED_SUPER, -1, 0);
if (ptr == MAP_FAILED)
return (-1);
@@ -492,8 +491,8 @@
* adjoining guard regions.
*/
len2 = VM_MMAP_GUARD_SIZE + len + VM_MMAP_GUARD_SIZE;
- flags = MAP_PRIVATE | MAP_ANON | MAP_NOCORE | MAP_ALIGNED_SUPER;
- base = mmap(NULL, len2, PROT_NONE, flags, -1, 0);
+ base = mmap(NULL, len2, PROT_NONE, MAP_GUARD | MAP_ALIGNED_SUPER, -1,
+ 0);
if (base == MAP_FAILED)
goto done;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 23, 11:28 PM (13 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16782308
Default Alt Text
D16822.diff (1 KB)
Attached To
Mode
D16822: bhyve: Use MAP_GUARD guard pages
Attached
Detach File
Event Timeline
Log In to Comment