View | Details | Raw Unified | Return to bug 193961 | Differences between
and this patch

Collapse All | Expand All

(-)sys/sys/mman.h (-2 / +2 lines)
Lines 69-76 Link Here
69
#define	MAP_FIXED	 0x0010	/* map addr must be exactly as requested */
69
#define	MAP_FIXED	 0x0010	/* map addr must be exactly as requested */
70
70
71
#if __BSD_VISIBLE
71
#if __BSD_VISIBLE
72
#define	MAP_RENAME	 0x0020	/* Sun: rename private pages to file */
72
#define	MAP_RESERVED0020 0x0020	/* previously unimplemented MAP_RENAME */
73
#define	MAP_NORESERVE	 0x0040	/* Sun: don't reserve needed swap area */
73
#define	MAP_RESERVED0040 0x0040	/* previously unimplemented MAP_NORESERVE */
74
#define	MAP_RESERVED0080 0x0080	/* previously misimplemented MAP_INHERIT */
74
#define	MAP_RESERVED0080 0x0080	/* previously misimplemented MAP_INHERIT */
75
#define	MAP_RESERVED0100 0x0100	/* previously unimplemented MAP_NOEXTEND */
75
#define	MAP_RESERVED0100 0x0100	/* previously unimplemented MAP_NOEXTEND */
76
#define	MAP_HASSEMAPHORE 0x0200	/* region may contain semaphores */
76
#define	MAP_HASSEMAPHORE 0x0200	/* region may contain semaphores */
(-)sys/sys/param.h (-1 / +2 lines)
Lines 58-64 Link Here
58
 *		in the range 5 to 9.
58
 *		in the range 5 to 9.
59
 */
59
 */
60
#undef __FreeBSD_version
60
#undef __FreeBSD_version
61
#define __FreeBSD_version 1100036	/* Master, propagated to newvers */
61
#define __FreeBSD_version 1100037	/* Master, propagated to newvers */
62
62
63
/*
63
/*
64
 * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
64
 * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
Lines 81-86 Link Here
81
#define	P_OSREL_SIGSEGV		700004
81
#define	P_OSREL_SIGSEGV		700004
82
#define	P_OSREL_MAP_ANON	800104
82
#define	P_OSREL_MAP_ANON	800104
83
#define	P_OSREL_MAP_FSTRICT	1100036
83
#define	P_OSREL_MAP_FSTRICT	1100036
84
#define	P_OSREL_MAP_RENAME	1100037
84
85
85
#define	P_OSREL_MAJOR(x)	((x) / 100000)
86
#define	P_OSREL_MAJOR(x)	((x) / 100000)
86
#endif
87
#endif
(-)sys/vm/vm_mmap.c (-3 / +9 lines)
Lines 220-225 Link Here
220
	fp = NULL;
220
	fp = NULL;
221
221
222
	/*
222
	/*
223
	 * Ignore old flags that used to be defined but did not do anything.
224
	 */
225
	if (td->td_proc->p_osrel < P_OSREL_MAP_RENAME)
226
		flags &= ~(MAP_RESERVED0020 | MAP_RESERVED0040);
227
	
228
	/*
223
	 * Enforce the constraints.
229
	 * Enforce the constraints.
224
	 * Mapping of length 0 is only allowed for old binaries.
230
	 * Mapping of length 0 is only allowed for old binaries.
225
	 * Anonymous mapping shall specify -1 as filedescriptor and
231
	 * Anonymous mapping shall specify -1 as filedescriptor and
Lines 244-252 Link Here
244
		flags |= MAP_ANON;
250
		flags |= MAP_ANON;
245
		pos = 0;
251
		pos = 0;
246
	}
252
	}
247
	if ((flags & ~(MAP_SHARED | MAP_PRIVATE | MAP_FIXED | MAP_RENAME |
253
	if ((flags & ~(MAP_SHARED | MAP_PRIVATE | MAP_FIXED | MAP_HASSEMAPHORE |
248
	    MAP_NORESERVE | MAP_HASSEMAPHORE | MAP_STACK | MAP_NOSYNC |
254
	    MAP_STACK | MAP_NOSYNC | MAP_ANON | MAP_EXCL | MAP_NOCORE |
249
	    MAP_ANON | MAP_EXCL | MAP_NOCORE | MAP_PREFAULT_READ |
255
	    MAP_PREFAULT_READ |
250
#ifdef MAP_32BIT
256
#ifdef MAP_32BIT
251
	    MAP_32BIT |
257
	    MAP_32BIT |
252
#endif
258
#endif
(-)usr.bin/truss/syscalls.c (-2 / +2 lines)
Lines 309-316 Link Here
309
};
309
};
310
310
311
static struct xlat mmap_flags[] = {
311
static struct xlat mmap_flags[] = {
312
	X(MAP_SHARED) X(MAP_PRIVATE) X(MAP_FIXED) X(MAP_RENAME)
312
	X(MAP_SHARED) X(MAP_PRIVATE) X(MAP_FIXED) X(MAP_RESERVED0020)
313
	X(MAP_NORESERVE) X(MAP_RESERVED0080) X(MAP_RESERVED0100)
313
	X(MAP_RESERVED0040) X(MAP_RESERVED0080) X(MAP_RESERVED0100)
314
	X(MAP_HASSEMAPHORE) X(MAP_STACK) X(MAP_NOSYNC) X(MAP_ANON)
314
	X(MAP_HASSEMAPHORE) X(MAP_STACK) X(MAP_NOSYNC) X(MAP_ANON)
315
	X(MAP_NOCORE) X(MAP_PREFAULT_READ)
315
	X(MAP_NOCORE) X(MAP_PREFAULT_READ)
316
#ifdef MAP_32BIT
316
#ifdef MAP_32BIT

Return to bug 193961