]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: ppc64 address space capped at 32TB, mmap randomisation disabled
authorAnton Blanchard <anton@samba.org>
Mon, 18 Nov 2013 03:55:28 +0000 (14:55 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 20 Nov 2013 23:33:41 +0000 (10:33 +1100)
commit561c0ff88a2edf4a4730590fe67a4927e3531ce9
tree32c5263ce80a6d96ec35a66edac9ec6e97774944
parent812c06b160079f51870e056a0cce1aa71a9e6437
powerpc: ppc64 address space capped at 32TB, mmap randomisation disabled

Commit 9c72006104b2 (mm: use vm_unmapped_area() on powerpc architecture)
has a bug in slice_scan_available() where we compare an unsigned long
(high_slices) against a shifted int. As a result, comparisons against
the top 32 bits of high_slices (representing the top 32TB) always
returns 0 and the top of our mmap region is clamped at 32TB

This also breaks mmap randomisation since the randomised address is
always up near the top of the address space and it gets clamped down
to 32TB.

Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Michel Lespinasse <walken@google.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/mm/slice.c