Re: mm: insure topdown mmap chooses addresses above security minimum

2013-09-27 Thread Timothy Pepper
On Wed 25 Sep at 19:44:36 +0200 mi...@kernel.org said: > > * Timothy Pepper wrote: > > > On Wed 25 Sep at 09:30:49 +0200 mi...@kernel.org said: > > > > info.flags = VM_UNMAPPED_AREA_TOPDOWN; > > > > info.length = len; >

Re: mm: insure topdown mmap chooses addresses above security minimum

2013-09-25 Thread Timothy Pepper
On Wed 25 Sep at 09:30:49 +0200 mi...@kernel.org said: > > info.flags = VM_UNMAPPED_AREA_TOPDOWN; > > info.length = len; > > - info.low_limit = PAGE_SIZE; > > + info.low_limit = max(PAGE_SIZE, PAGE_ALIGN(mmap_min_addr)); > > info.high_limit = mm->mmap_base; > > info.align_mask =

mm: insure topdown mmap chooses addresses above security minimum

2013-09-24 Thread Timothy Pepper
A security check is performed on mmap addresses in security/security.c:security_mmap_addr(). It uses mmap_min_addr to insure mmaps don't get addresses lower than a user configurable guard value (/proc/sys/vm/mmap_min_addr). The arch specific mmap topdown searches look for a map candidate address