]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: ASLR: Don't randomise text when randomise_va_space == 0
authorArun Chandran <achandran@mvista.com>
Fri, 10 Oct 2014 11:31:24 +0000 (12:31 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 24 Oct 2014 14:47:49 +0000 (15:47 +0100)
commitde5dc9aa31cd85566843a0a3dddeba8f4916f6f6
treea40d98e18e154c3d04e673842864812e14425c08
parent3580038ebfe8a41911a361f8a995bf5c14686528
arm64: ASLR: Don't randomise text when randomise_va_space == 0

When user asks to turn off ASLR by writing "0" to
/proc/sys/kernel/randomize_va_space there should not be
any randomization to mmap base, stack, VDSO, libs, text and heap

Currently arm64 violates this behavior by randomising text.
Fix this by defining a constant ELF_ET_DYN_BASE. The randomisation of
mm->mmap_base is done by setup_new_exec -> arch_pick_mmap_layout ->
mmap_base -> mmap_rnd.

Signed-off-by: Arun Chandran <achandran@mvista.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/Kconfig
arch/arm64/include/asm/elf.h
arch/arm64/kernel/process.c