Re: don't let mmap allocate down to zero

From: Rik van Riel
Date: Fri Jan 28 2005 - 10:45:36 EST


On Fri, 28 Jan 2005, Hugh Dickins wrote:

Perhaps you're coming from experience of various buggy apps
that get into difficulties if mmaps are found below mm->brk?
I'm not sure that we should be cutting others' address space to
make life easier for those, they should be ADDR_COMPAT_LAYOUT.

The main thing I would really like to preserve is the
space used for "near-NULL" pointer detection. That is,
detection of trying to access a large index in a NULL
pointer array, etc.

I'd be happy to have some arbitrary value for the lower
boundary...

arch/ppc64/mm/hugetlbpage.c (odd place to find it) has its own
arch_get_unmapped_area_topdown, should be given a similar fix.

Good point, though a 64 bit architecture is, umm, less
likely to run all the way down to zero within our lifetime.

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/