Re: Repost: could ia32 mmap() allocations grow downward?

Hugh Dickins (hugh@veritas.com)
Thu, 13 Dec 2001 18:02:56 +0000 (GMT)


On Thu, 13 Dec 2001, Wayne Whitney wrote:
> On Thu, 13 Dec 2001, Hugh Dickins wrote:
>
> > My fear is that you may encounter an indefinite number of buggy apps,
> > which expect an mmap() to follow the mmap() before: easy bug to
> > commit, and to go unnoticed, until you reverse the layout.
>
> Hmm, so which is more important to support, buggy users of (unguaranteed
> side effects of) the new interface, or users of the legacy interface? I
> can see the argument that that the buggy users of the new interface are
> more important. Maybe CONFIG_MMAP_GROWS_DOWNWARDS, or a /proc entry?

Hard to know until you try it: my fear may prove groundless,
or experience may discourage you from the exercise completely.

Quick guess is that what you'd really want in the end is not a
CONFIG option or /proc tunable, but some mark in an ELF section
for what behaviour that particular executable wants.

I'm reluctant to call wanting a large virtual address space buggy;
but expecting contiguous ascending mmaps (without MAP_FIXED) is buggy.

Hugh

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/