powerpc: Increase stack gap on 64bit binaries
authorAnton Blanchard <anton@samba.org>
Sun, 22 Feb 2009 01:50:06 +0000 (01:50 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 23 Feb 2009 04:53:21 +0000 (15:53 +1100)
commit002b0ec73dd8b784004e5a013ad9f2fa6274af5a
tree8d614f85805a4884fcf485f292eb158c7aceb0af
parenta5adc91a4b44b5d1706b9d906cc14fe4f312afe9
powerpc: Increase stack gap on 64bit binaries

On 64bit there is a possibility our stack and mmap randomisation will put
the two close enough such that we can't expand our stack to match the ulimit
specified.

To avoid this, start the upper mmap address at 1GB + 128MB below the top of our
address space, so in the worst case we end up with the same ~128MB hole as in
32bit. This works because we randomise the stack over a 1GB range.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/mm/mmap.c