powerpc: Randomise PIEs
Randomise ELF_ET_DYN_BASE, which is used when loading position independent executables. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
002b0ec73d
commit
501cb16d3c
2 changed files with 12 additions and 1 deletions
|
@ -1170,3 +1170,13 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
unsigned long randomize_et_dyn(unsigned long base)
|
||||
{
|
||||
unsigned long ret = PAGE_ALIGN(base + brk_rnd());
|
||||
|
||||
if (ret < base)
|
||||
return base;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue