summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/elf.h
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2009-02-22 02:50:04 +0100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-02-23 05:53:20 +0100
commit912f9ee21c836081e3c96dfe61025841ebeb95da (patch)
tree289e0c461cb651d041a2f1df359d88f285b82b4d /arch/powerpc/include/asm/elf.h
parentpowerpc: Randomise lower bits of stack address (diff)
downloadlinux-912f9ee21c836081e3c96dfe61025841ebeb95da.tar.xz
linux-912f9ee21c836081e3c96dfe61025841ebeb95da.zip
powerpc: Randomise the brk region
Randomize the heap. before: tundro2:~ # sleep 1 & cat /proc/${!}/maps | grep heap 10017000-10118000 rw-p 10017000 00:00 0 [heap] 10017000-10118000 rw-p 10017000 00:00 0 [heap] 10017000-10118000 rw-p 10017000 00:00 0 [heap] 10017000-10118000 rw-p 10017000 00:00 0 [heap] 10017000-10118000 rw-p 10017000 00:00 0 [heap] after tundro2:~ # sleep 1 & cat /proc/${!}/maps | grep heap 19419000-1951a000 rw-p 19419000 00:00 0 [heap] 325ff000-32700000 rw-p 325ff000 00:00 0 [heap] 1a97c000-1aa7d000 rw-p 1a97c000 00:00 0 [heap] 1cc60000-1cd61000 rw-p 1cc60000 00:00 0 [heap] 1afa9000-1b0aa000 rw-p 1afa9000 00:00 0 [heap] Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/elf.h')
-rw-r--r--arch/powerpc/include/asm/elf.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index 3f94d8880e6c..968b37f7a9f8 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -276,6 +276,9 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
(0x7ff >> (PAGE_SHIFT - 12)) : \
(0x3ffff >> (PAGE_SHIFT - 12)))
+extern unsigned long arch_randomize_brk(struct mm_struct *mm);
+#define arch_randomize_brk arch_randomize_brk
+
#endif /* __KERNEL__ */
/*