FROMLIST: x86: mm: support ARCH_MMAP_RND_BITS.
authordcashman <dcashman@google.com>
Tue, 12 Jan 2016 17:51:16 +0000 (09:51 -0800)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:54:15 +0000 (13:54 -0800)
commitd51891f0fd12b5ad52bc9056933132f2b24f3407
tree145d5e4edb980c056e1ed1782b6e7d6e1e73b51d
parente2240a15c1f686fc53e8c308f46c8c16cc80302b
FROMLIST: x86: mm: support ARCH_MMAP_RND_BITS.

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

x86: arch_mmap_rnd() uses hard-coded values, 8 for 32-bit and 28 for
64-bit, 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 default
values as new minimums.

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