Skip to content

Commit

Permalink
powerpc/32: Don't clobber personality flags on exec
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andreas Schwab authored and Paul Mackerras committed Apr 22, 2009
1 parent 24f1ce8 commit 59e4c3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ do { \
# define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \
(exec_stk != EXSTACK_DISABLE_X) : 0)
#else
# define SET_PERSONALITY(ex) set_personality(PER_LINUX)
# define SET_PERSONALITY(ex) \
set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
#endif /* __powerpc64__ */

extern int dcache_bsize;
Expand Down

0 comments on commit 59e4c3a

Please sign in to comment.