NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/50985: uvm_mmap.c::range_test should use runtime limits of the vmspace?

>Number:         50985
>Category:       kern
>Synopsis:       uvm_mmap.c::range_test should use runtime limits of the vmspace?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 20 12:50:00 +0000 2016
>Originator:     Martin Husemann
>Release:        NetBSD 7.99.26
The NetBSD Foundation, Inc.
System: NetBSD 7.99.26 NetBSD 7.99.26 (NIGHT-OWL) #393: Fri Mar 11 14:19:47 CET 2016 amd64
Architecture: x86_64
Machine: amd64

When creating a vmspace, we take various things (like the binary we are going
to execute) into account. This may result in different min/max values for
the virtual address in the new vmspace.

However, in uvm_mmap.c::range_test() we do not check this (potential differing)
values, but compare against the compile time defaults VM_MIN_ADDRESS

Differences might be seen on some emulations, or for example with old
sparc64 binaries compiled with a restricted compiler memory model.

code inspection

Pass the vmspace to the function and use its vm_map headers .end/.start members
instead? Maybe create accessor macros symetric to vm_map_setmin/vm_map_setmax.

Home | Main Index | Thread Index | Old Index