FROMLIST: arm: mm: support ARCH_MMAP_RND_BITS.
authordcashman <dcashman@google.com>
Tue, 12 Jan 2016 17:44:35 +0000 (09:44 -0800)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:54:14 +0000 (13:54 -0800)
commit25106ff489ec21fc24528c8bdc9c12edd2c37c05
treecde7cfcd8f1fbeb3dd7a534b4912fa052a0c5b02
parentd49d88766ba924b3df96d9fc1c1a257b90970b74
FROMLIST: arm: mm: support ARCH_MMAP_RND_BITS.

(cherry picked from commit https://lkml.org/lkml/2015/12/21/341)

arm: arch_mmap_rnd() uses a hard-code value of 8 to generate the
random offset for the mmap base address.  This value represents a
compromise between increased ASLR effectiveness and avoiding
address-space fragmentation. Replace it with a Kconfig option, which
is sensibly bounded, so that platform developers may choose where to
place this compromise. Keep 8 as the minimum acceptable value.

Bug: 24047224
Signed-off-by: Daniel Cashman <dcashman@android.com>
Signed-off-by: Daniel Cashman <dcashman@google.com>
Change-Id: I438ae2dae939ea7f311246832cb789afdd6cba4e
arch/arm/Kconfig
arch/arm/mm/mmap.c