diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-23 16:40:23 +0100 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-23 16:40:28 +0100 |
commit | 03e4c49f847f23c62900424f65a62f76de5a7151 (patch) | |
tree | 4b08234e317091e2bab8998cc256f60e303e3c0a /arch | |
parent | f3b8436ad9a8ad36b3c9fa1fe030c7f38e5d3d0b (diff) |
[S390] personality: fix personality loss on execve
Use the personality() macro to mask out all bits that are not
relevant for the personality type.
The personality field contains bits for other things as well,
so without masking out the not relevalent bits the comparison
won't do what is expected.
Reported-by: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/include/asm/elf.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h index d480f39d65e..74d0bbb7d95 100644 --- a/arch/s390/include/asm/elf.h +++ b/arch/s390/include/asm/elf.h @@ -172,14 +172,14 @@ extern char elf_platform[]; #ifndef __s390x__ #define SET_PERSONALITY(ex) set_personality(PER_LINUX) #else /* __s390x__ */ -#define SET_PERSONALITY(ex) \ -do { \ - if (current->personality != PER_LINUX32) \ - set_personality(PER_LINUX); \ - if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ - set_thread_flag(TIF_31BIT); \ - else \ - clear_thread_flag(TIF_31BIT); \ +#define SET_PERSONALITY(ex) \ +do { \ + if (personality(current->personality) != PER_LINUX32) \ + set_personality(PER_LINUX); \ + if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ + set_thread_flag(TIF_31BIT); \ + else \ + clear_thread_flag(TIF_31BIT); \ } while (0) #endif /* __s390x__ */ |