summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2013-09-09 18:11:59 +0000
committerjhb <jhb@FreeBSD.org>2013-09-09 18:11:59 +0000
commit04bb6e10cd2cbd0ee0de7fef3f81e88ebd43e6b4 (patch)
tree42d2ff2e91fcca16534848427856c6243db2126a /sys/compat/linux/linux_misc.c
parent2a48fed0b32ceb1567f3b7e33835bacfdf3e0971 (diff)
downloadFreeBSD-src-04bb6e10cd2cbd0ee0de7fef3f81e88ebd43e6b4.zip
FreeBSD-src-04bb6e10cd2cbd0ee0de7fef3f81e88ebd43e6b4.tar.gz
Add a mmap flag (MAP_32BIT) on 64-bit platforms to request that a mapping use
an address in the first 2GB of the process's address space. This flag should have the same semantics as the same flag on Linux. To facilitate this, add a new parameter to vm_map_find() that specifies an optional maximum virtual address. While here, fix several callers of vm_map_find() to use a VMFS_* constant for the findspace argument instead of TRUE and FALSE. Reviewed by: alc Approved by: re (kib)
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r--sys/compat/linux/linux_misc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 378bc37..ac2384c 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -410,8 +410,8 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args)
/* get anon user mapping, read+write+execute */
error = vm_map_find(&td->td_proc->p_vmspace->vm_map, NULL, 0,
- &vmaddr, a_out->a_text + a_out->a_data, FALSE, VM_PROT_ALL,
- VM_PROT_ALL, 0);
+ &vmaddr, a_out->a_text + a_out->a_data, 0, VMFS_NO_SPACE,
+ VM_PROT_ALL, VM_PROT_ALL, 0);
if (error)
goto cleanup;
@@ -455,7 +455,8 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args)
/* allocate some 'anon' space */
error = vm_map_find(&td->td_proc->p_vmspace->vm_map, NULL, 0,
- &vmaddr, bss_size, FALSE, VM_PROT_ALL, VM_PROT_ALL, 0);
+ &vmaddr, bss_size, 0, VMFS_NO_SPACE, VM_PROT_ALL,
+ VM_PROT_ALL, 0);
if (error)
goto cleanup;
}
OpenPOWER on IntegriCloud