diff options
| -rw-r--r-- | arch/powerpc/Kconfig | 1 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/elf.h | 3 | ||||
| -rw-r--r-- | arch/powerpc/kernel/process.c | 9 |
3 files changed, 2 insertions, 11 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 46227336aacb..421df5cc6d18 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
| @@ -88,6 +88,7 @@ config PPC | |||
| 88 | select ARCH_MIGHT_HAVE_PC_PARPORT | 88 | select ARCH_MIGHT_HAVE_PC_PARPORT |
| 89 | select ARCH_MIGHT_HAVE_PC_SERIO | 89 | select ARCH_MIGHT_HAVE_PC_SERIO |
| 90 | select BINFMT_ELF | 90 | select BINFMT_ELF |
| 91 | select ARCH_BINFMT_ELF_RANDOMIZE_PIE | ||
| 91 | select OF | 92 | select OF |
| 92 | select OF_EARLY_FLATTREE | 93 | select OF_EARLY_FLATTREE |
| 93 | select OF_RESERVED_MEM | 94 | select OF_RESERVED_MEM |
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h index 888d8f3f2524..57d289acb803 100644 --- a/arch/powerpc/include/asm/elf.h +++ b/arch/powerpc/include/asm/elf.h | |||
| @@ -28,8 +28,7 @@ | |||
| 28 | the loader. We need to make sure that it is out of the way of the program | 28 | the loader. We need to make sure that it is out of the way of the program |
| 29 | that it will "exec", and that there is sufficient room for the brk. */ | 29 | that it will "exec", and that there is sufficient room for the brk. */ |
| 30 | 30 | ||
| 31 | extern unsigned long randomize_et_dyn(unsigned long base); | 31 | #define ELF_ET_DYN_BASE 0x20000000 |
| 32 | #define ELF_ET_DYN_BASE (randomize_et_dyn(0x20000000)) | ||
| 33 | 32 | ||
| 34 | #define ELF_CORE_EFLAGS (is_elf2_task() ? 2 : 0) | 33 | #define ELF_CORE_EFLAGS (is_elf2_task() ? 2 : 0) |
| 35 | 34 | ||
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index f6b82152e7aa..b4cc7bef6b16 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
| @@ -1654,12 +1654,3 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) | |||
| 1654 | return ret; | 1654 | return ret; |
| 1655 | } | 1655 | } |
| 1656 | 1656 | ||
| 1657 | unsigned long randomize_et_dyn(unsigned long base) | ||
| 1658 | { | ||
| 1659 | unsigned long ret = PAGE_ALIGN(base + brk_rnd()); | ||
| 1660 | |||
| 1661 | if (ret < base) | ||
| 1662 | return base; | ||
| 1663 | |||
| 1664 | return ret; | ||
| 1665 | } | ||
