diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2009-04-16 02:22:01 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2009-04-22 00:56:34 -0400 |
commit | 59e4c3a2fe9cb1681bb2cff508ff79466f7585ba (patch) | |
tree | 38971238bec3a2d21b70ac16c2d1dea2afa628bc /arch/powerpc/include/asm | |
parent | 24f1ce803c55f645429e6a7dd94763fbace84b0a (diff) |
powerpc/32: Don't clobber personality flags on exec
Now that ppc32 implements address randomization it also wants to inherit
personality flags like ADDR_NO_RANDOMIZE across exec, for things like
`setarch ppc -R' to work. But the ppc32 version of SET_PERSONALITY
forcefully sets PER_LINUX, clearing all personality flags. So be
careful about preserving the flags.
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r-- | arch/powerpc/include/asm/elf.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h index 1a856b15226e..087c22f1d368 100644 --- a/arch/powerpc/include/asm/elf.h +++ b/arch/powerpc/include/asm/elf.h | |||
@@ -258,7 +258,8 @@ do { \ | |||
258 | # define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \ | 258 | # define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \ |
259 | (exec_stk != EXSTACK_DISABLE_X) : 0) | 259 | (exec_stk != EXSTACK_DISABLE_X) : 0) |
260 | #else | 260 | #else |
261 | # define SET_PERSONALITY(ex) set_personality(PER_LINUX) | 261 | # define SET_PERSONALITY(ex) \ |
262 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
262 | #endif /* __powerpc64__ */ | 263 | #endif /* __powerpc64__ */ |
263 | 264 | ||
264 | extern int dcache_bsize; | 265 | extern int dcache_bsize; |