Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109835257
D41159.id125091.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
D41159.id125091.diff
View Options
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -1554,7 +1554,7 @@
vm_prot_t maxprot, int flags, vm_object_t object, vm_ooffset_t foff,
boolean_t writecounted, struct thread *td)
{
- vm_offset_t max_addr;
+ vm_offset_t max_addr, min_addr;
int docow, error, findspace, rv;
bool curmap, fitit;
@@ -1623,16 +1623,21 @@
MAP_ALIGNMENT_SHIFT);
else
findspace = VMFS_OPTIMAL_SPACE;
- max_addr = 0;
#ifdef MAP_32BIT
- if ((flags & MAP_32BIT) != 0)
+ if ((flags & MAP_32BIT) != 0) {
max_addr = MAP_32BIT_MAX_ADDR;
+ min_addr = vm_map_min(map);
+ } else
#endif
+ {
+ max_addr = 0;
+ min_addr = round_page((vm_offset_t)td->td_proc->
+ p_vmspace->vm_daddr + lim_max(td, RLIMIT_DATA));
+ }
if (curmap) {
rv = vm_map_find_min(map, object, foff, addr, size,
- round_page((vm_offset_t)td->td_proc->p_vmspace->
- vm_daddr + lim_max(td, RLIMIT_DATA)), max_addr,
- findspace, prot, maxprot, docow);
+ min_addr, max_addr, findspace, prot, maxprot,
+ docow);
} else {
rv = vm_map_find(map, object, foff, addr, size,
max_addr, findspace, prot, maxprot, docow);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 11, 3:33 AM (9 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16588361
Default Alt Text
D41159.id125091.diff (1 KB)
Attached To
Mode
D41159: mmap(2): fix MAP_32BIT when ASLR is disabled
Attached
Detach File
Event Timeline
Log In to Comment