Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230974
b: refs/heads/master
c: d2c9dfc
h: refs/heads/master
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Jan 12, 2011
1 parent d2731d7 commit 37f2bb5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3351918282fd664e918a3175ddfae9b15656122e
refs/heads/master: d2c9dfccbc3a449b9677772e7496e2656049d9f3
4 changes: 3 additions & 1 deletion trunk/arch/s390/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ extern unsigned int vdso_enabled;
use of this is to invoke "./ld.so someprog" to test out a new version of
the loader. We need to make sure that it is out of the way of the program
that it will "exec", and that there is sufficient room for the brk. */
#define ELF_ET_DYN_BASE (STACK_TOP / 3 * 2)

extern unsigned long randomize_et_dyn(unsigned long base);
#define ELF_ET_DYN_BASE (randomize_et_dyn(STACK_TOP / 3 * 2))

/* This yields a mask that user programs can use to figure out what
instruction set this CPU supports. */
Expand Down
11 changes: 11 additions & 0 deletions trunk/arch/s390/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,3 +359,14 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
return mm->brk;
return ret;
}

unsigned long randomize_et_dyn(unsigned long base)
{
unsigned long ret = PAGE_ALIGN(base + brk_rnd());

if (!(current->flags & PF_RANDOMIZE))
return base;
if (ret < base)
return base;
return ret;
}

0 comments on commit 37f2bb5

Please sign in to comment.