FROMLIST: arm: mm: support ARCH_MMAP_RND_BITS.
authordcashman <dcashman@google.com>
Tue, 29 Dec 2015 23:07:17 +0000 (15:07 -0800)
committerStricted <info@stricted.net>
Sat, 28 Jul 2018 05:07:08 +0000 (07:07 +0200)
commit5c713a970498bb369eecb9da97d35092add941b5
treec2478402d9547a757c432399fe03d11a504bb028
parent2a938b948abb59981c376e9a829e0be433dbdbc8
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: I2f6c18a0060e1c21b53200ecdcfde9a8c2e3db98
arch/arm/Kconfig
arch/arm/mm/mmap.c