diff options
author | Tony Luck <tony.luck@intel.com> | 2010-02-12 17:17:58 +0100 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2010-02-12 17:17:58 +0100 |
commit | 22208ac586f2e456c49e927b90ded50e923b6aee (patch) | |
tree | cb6b44f91c6f5f83307082d90fa7c314e75d08cb /arch/ia64 | |
parent | Merge branch 'for-2.6.33' of git://linux-nfs.org/~bfields/linux (diff) | |
download | linux-22208ac586f2e456c49e927b90ded50e923b6aee.tar.xz linux-22208ac586f2e456c49e927b90ded50e923b6aee.zip |
[IA64] preserve personality flag bits across exec
In its <asm/elf.h> ia64 defines SET_PERSONALITY in a way that unconditionally
sets the personality of the current process to PER_LINUX, losing any flag bits
from the upper 3 bytes of current->personality. This is wrong. Those bits are
intended to be inherited across exec (other code takes care of ensuring that
security sensitive bits like ADDR_NO_RANDOMIZE are not passed to unsuspecting
setuid/setgid applications).
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/include/asm/elf.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h index e14108b19c09..4c41656ede87 100644 --- a/arch/ia64/include/asm/elf.h +++ b/arch/ia64/include/asm/elf.h @@ -201,7 +201,9 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst); relevant until we have real hardware to play with... */ #define ELF_PLATFORM NULL -#define SET_PERSONALITY(ex) set_personality(PER_LINUX) +#define SET_PERSONALITY(ex) \ + set_personality((current->personality & ~PER_MASK) | PER_LINUX) + #define elf_read_implies_exec(ex, executable_stack) \ ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) |