summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2009-10-02 17:51:46 +0000
committerbz <bz@FreeBSD.org>2009-10-02 17:51:46 +0000
commit3b88ee818730fa4e010b7e0e18f6394ab1b374bf (patch)
tree6db925f74bcd6cb942c7a8438c8cc05ec51c236e /sys
parentbc660fe08f5a3fcc675457693dce1aa6f0f38e30 (diff)
downloadFreeBSD-src-3b88ee818730fa4e010b7e0e18f6394ab1b374bf.zip
FreeBSD-src-3b88ee818730fa4e010b7e0e18f6394ab1b374bf.tar.gz
Back out the functional parts from r197537. After r197711, affecting all
user mappings, mmap no longer needs special treatment.
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_mmap.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index e8ba134..4963a60 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -97,14 +97,6 @@ SYSCTL_INT(_vm, OID_AUTO, max_proc_mmap, CTLFLAG_RW, &max_proc_mmap, 0,
"Maximum number of memory-mapped files per process");
/*
- * 'mmap_zero' determines whether or not MAP_FIXED mmap() requests for
- * virtual address zero are permitted.
- */
-static int mmap_zero;
-SYSCTL_INT(_security_bsd, OID_AUTO, mmap_zero, CTLFLAG_RW, &mmap_zero, 0,
- "Processes may map an object at virtual address zero");
-
-/*
* Set the maximum number of vm_map_entry structures per process. Roughly
* speaking vm_map_entry structures are tiny, so allowing them to eat 1/100
* of our KVM malloc space still results in generous limits. We want a
@@ -277,13 +269,6 @@ mmap(td, uap)
if (addr & PAGE_MASK)
return (EINVAL);
- /*
- * Mapping to address zero is only permitted if
- * mmap_zero is enabled.
- */
- if (addr == 0 && !mmap_zero)
- return (EINVAL);
-
/* Address range must be all in user VM space. */
if (addr < vm_map_min(&vms->vm_map) ||
addr + size > vm_map_max(&vms->vm_map))
OpenPOWER on IntegriCloud