FreeBSD Bugzilla – Attachment 147741 Details for
Bug 193961
[exp-run] Remove MAP_RENAME and MAP_NORESERVE
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
D848-2.diff (text/plain), 3.01 KB, created by
Antoine Brodin
on 2014-09-28 07:09:05 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antoine Brodin
Created:
2014-09-28 07:09:05 UTC
Size:
3.01 KB
patch
obsolete
>Index: sys/sys/mman.h >=================================================================== >--- sys/sys/mman.h (revision 272237) >+++ sys/sys/mman.h (working copy) >@@ -69,8 +69,8 @@ > #define MAP_FIXED 0x0010 /* map addr must be exactly as requested */ > > #if __BSD_VISIBLE >-#define MAP_RENAME 0x0020 /* Sun: rename private pages to file */ >-#define MAP_NORESERVE 0x0040 /* Sun: don't reserve needed swap area */ >+#define MAP_RESERVED0020 0x0020 /* previously unimplemented MAP_RENAME */ >+#define MAP_RESERVED0040 0x0040 /* previously unimplemented MAP_NORESERVE */ > #define MAP_RESERVED0080 0x0080 /* previously misimplemented MAP_INHERIT */ > #define MAP_RESERVED0100 0x0100 /* previously unimplemented MAP_NOEXTEND */ > #define MAP_HASSEMAPHORE 0x0200 /* region may contain semaphores */ >Index: sys/sys/param.h >=================================================================== >--- sys/sys/param.h (revision 272237) >+++ sys/sys/param.h (working copy) >@@ -58,7 +58,7 @@ > * in the range 5 to 9. > */ > #undef __FreeBSD_version >-#define __FreeBSD_version 1100036 /* Master, propagated to newvers */ >+#define __FreeBSD_version 1100037 /* Master, propagated to newvers */ > > /* > * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, >@@ -81,6 +81,7 @@ > #define P_OSREL_SIGSEGV 700004 > #define P_OSREL_MAP_ANON 800104 > #define P_OSREL_MAP_FSTRICT 1100036 >+#define P_OSREL_MAP_RENAME 1100037 > > #define P_OSREL_MAJOR(x) ((x) / 100000) > #endif >Index: sys/vm/vm_mmap.c >=================================================================== >--- sys/vm/vm_mmap.c (revision 272237) >+++ sys/vm/vm_mmap.c (working copy) >@@ -220,6 +220,12 @@ > fp = NULL; > > /* >+ * Ignore old flags that used to be defined but did not do anything. >+ */ >+ if (td->td_proc->p_osrel < P_OSREL_MAP_RENAME) >+ flags &= ~(MAP_RESERVED0020 | MAP_RESERVED0040); >+ >+ /* > * Enforce the constraints. > * Mapping of length 0 is only allowed for old binaries. > * Anonymous mapping shall specify -1 as filedescriptor and >@@ -244,9 +250,9 @@ > flags |= MAP_ANON; > pos = 0; > } >- if ((flags & ~(MAP_SHARED | MAP_PRIVATE | MAP_FIXED | MAP_RENAME | >- MAP_NORESERVE | MAP_HASSEMAPHORE | MAP_STACK | MAP_NOSYNC | >- MAP_ANON | MAP_EXCL | MAP_NOCORE | MAP_PREFAULT_READ | >+ if ((flags & ~(MAP_SHARED | MAP_PRIVATE | MAP_FIXED | MAP_HASSEMAPHORE | >+ MAP_STACK | MAP_NOSYNC | MAP_ANON | MAP_EXCL | MAP_NOCORE | >+ MAP_PREFAULT_READ | > #ifdef MAP_32BIT > MAP_32BIT | > #endif >Index: usr.bin/truss/syscalls.c >=================================================================== >--- usr.bin/truss/syscalls.c (revision 272237) >+++ usr.bin/truss/syscalls.c (working copy) >@@ -309,8 +309,8 @@ > }; > > static struct xlat mmap_flags[] = { >- X(MAP_SHARED) X(MAP_PRIVATE) X(MAP_FIXED) X(MAP_RENAME) >- X(MAP_NORESERVE) X(MAP_RESERVED0080) X(MAP_RESERVED0100) >+ X(MAP_SHARED) X(MAP_PRIVATE) X(MAP_FIXED) X(MAP_RESERVED0020) >+ X(MAP_RESERVED0040) X(MAP_RESERVED0080) X(MAP_RESERVED0100) > X(MAP_HASSEMAPHORE) X(MAP_STACK) X(MAP_NOSYNC) X(MAP_ANON) > X(MAP_NOCORE) X(MAP_PREFAULT_READ) > #ifdef MAP_32BIT
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 193961
: 147741 |
148279
|
148303