diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2012-08-28 10:02:08 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-08-30 16:28:07 +0200 |
commit | 768fd0737f4533635ea351566dff98fd4912b0d8 (patch) | |
tree | d6bf61b076364476af6e4c91bad505ed19933390 | |
parent | 29a877fa1f402ce2c1a0c52957c4e29b9bb34216 (diff) | |
download | op-kernel-dev-768fd0737f4533635ea351566dff98fd4912b0d8.zip op-kernel-dev-768fd0737f4533635ea351566dff98fd4912b0d8.tar.gz |
s390/32: Don't clobber personality flags on exec
In native 32 bit mode the personality flags were not correctly inherited.
This is the s390 version of 59e4c3a2 "powerpc/32: Don't clobber personality
flags on exec".
Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/include/asm/elf.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h index 32e8449..9b94a16 100644 --- a/arch/s390/include/asm/elf.h +++ b/arch/s390/include/asm/elf.h @@ -180,7 +180,8 @@ extern char elf_platform[]; #define ELF_PLATFORM (elf_platform) #ifndef CONFIG_64BIT -#define SET_PERSONALITY(ex) set_personality(PER_LINUX) +#define SET_PERSONALITY(ex) \ + set_personality(PER_LINUX | (current->personality & (~PER_MASK))) #else /* CONFIG_64BIT */ #define SET_PERSONALITY(ex) \ do { \ |