Skip to content

Commit

Permalink
powerpc: Clear ELF personality flag if ELFv2 is not requested.
Browse files Browse the repository at this point in the history
powerpc: Clear ELF personality flag if ELFv2 is not requested.

The POWER kernel uses a personality flag to determine whether it should
be setting up function descriptors or not (per the updated ABI).  This
flag wasn't being cleared on a new process but instead was being
inherited.  The visible effect was that an ELFv2 binary could not execve
to an ELFv1 binary.

Signed-off-by: Jeff Bailey <jeffbailey@google.com>

 arch/powerpc/include/asm/elf.h | 2 ++
 1 file changed, 2 insertions(+)
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Jeff Bailey authored and Benjamin Herrenschmidt committed May 20, 2014
1 parent 21f5850 commit 1efc563
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/powerpc/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ typedef elf_vrregset_t elf_fpxregset_t;
do { \
if (((ex).e_flags & 0x3) == 2) \
set_thread_flag(TIF_ELF2ABI); \
else \
clear_thread_flag(TIF_ELF2ABI); \
if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
set_thread_flag(TIF_32BIT); \
else \
Expand Down

0 comments on commit 1efc563

Please sign in to comment.