x86, PPC and SPARC will randomize the application heap and library
load addresses depending on the value of randomize_va_space. This
patch set implements address space randomization for MIPS.
Tested with a 64-bit kernel (OCTEON) and verified, for all three ABIs,
that the result of 'cat /proc/self/maps' gives different values for
[heap] and shared libraries with each invocation. The stack was
already randomized and also gets a different value for each
invocation.
Someone may want to test it on a 32-bit kernel, but it should work
there as well.
I will reply with the two patches.
David Daney (2):
MIPS: Randomize mmap if randomize_va_space is set
MIPS: Enable heap randomization.
arch/mips/include/asm/elf.h | 5 ++++
arch/mips/include/asm/processor.h | 11 ++++++++
arch/mips/kernel/syscall.c | 49 ++++++++++++++++++++++++++++++++++++-
3 files changed, 64 insertions(+), 1 deletions(-)
|