Thread (5 messages) flat view 5 messages, 3 authors, 2017-02-10

Re: [PATCH v2 1/1] powerpc: mm: support ARCH_MMAP_RND_BITS

From: Kees Cook <hidden>
Date: 2017-02-04 00:43:55

On Thu, Feb 2, 2017 at 9:11 PM, Bhupesh Sharma [off-list ref] wrote:
powerpc: arch_mmap_rnd() uses hard-coded values, (23-PAGE_SHIFT) for
32-bit and (30-PAGE_SHIFT) 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.

This patch makes sure that now powerpc mmap arch_mmap_rnd() approach
is similar to other ARCHs like x86, arm64 and arm.

Cc: Alexander Graf <redacted>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <redacted>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Alistair Popple <redacted>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Vitaly Bordug <redacted>
Cc: Scott Wood <oss@buserror.net>
Cc: Kumar Gala <redacted>
Cc: Daniel Cashman <redacted>
Signed-off-by: Bhupesh Sharma <redacted>
Reviewed-by: Kees Cook <keescook at chromium.org>
This " at " should be "@", but otherwise, yay v2! :)

-Kees

-- 
Kees Cook
Pixel Security
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help