浏览代码

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>
Heiko Carstens 13 年之前
父节点
当前提交
768fd0737f
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      arch/s390/include/asm/elf.h

+ 2 - 1
arch/s390/include/asm/elf.h

@@ -180,7 +180,8 @@ extern char elf_platform[];
 #define ELF_PLATFORM (elf_platform)
 #define ELF_PLATFORM (elf_platform)
 
 
 #ifndef CONFIG_64BIT
 #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 */
 #else /* CONFIG_64BIT */
 #define SET_PERSONALITY(ex)					\
 #define SET_PERSONALITY(ex)					\
 do {								\
 do {								\