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; > > > > - info.low_limit = PAGE_SIZE; > > > > + in

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

2013-09-25 Thread Ingo Molnar
* 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; > > > - info.low_limit = PAGE_SIZE; > > > + info.low_limit = max(PAGE_SIZE, PAGE_ALIGN(mmap_min_addr)); > > > info.high_limit = mm->mmap_ba

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 =

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

2013-09-25 Thread Ingo Molnar
* Timothy Pepper wrote: > 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 searche

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

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

2013-09-24 Thread Russell King - ARM Linux
On Tue, Sep 24, 2013 at 02:23:31PM -0700, Timothy Pepper wrote: > diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c > index 0c63562..0e7355d 100644 > --- a/arch/arm/mm/mmap.c > +++ b/arch/arm/mm/mmap.c > @@ -9,6 +9,7 @@ > #include > #include > #include > +#include > #include > > #def