Skip to content

Commit

Permalink
parisc: fix personality on 32bit kernel
Browse files Browse the repository at this point in the history
Process personality is stored together with other flags like UNAME26 in
an integer variable.  Overwriting this value with PER_LINUX drops all
other existing flags and as such broke tools like the uname26 tool.

Actually this was only broken on 32bit kernels, since for 32bit-ELF
binaries on 64-bit kernels the SET_PERSONALITY macro from
arch/parisc/kernel/binfmt_elf32.c is used which does not modifies the
personality value at all (which is wrong as long as we don't run HPUX
binaries or similiar).

Signed-off-by: Helge Deller <deller@gmx.de>
  • Loading branch information
Helge Deller committed Feb 20, 2013
1 parent 2408474 commit 330cb32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/parisc/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ typedef unsigned long elf_greg_t;
#define ELF_PLATFORM ("PARISC\0")

#define SET_PERSONALITY(ex) \
current->personality = PER_LINUX; \
set_personality((current->personality & ~PER_MASK) | PER_LINUX); \
current->thread.map_base = DEFAULT_MAP_BASE; \
current->thread.task_size = DEFAULT_TASK_SIZE \

Expand Down

0 comments on commit 330cb32

Please sign in to comment.