Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

parisc: fix personality on 32bit kernel

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>

+1 -1
+1 -1
arch/parisc/include/asm/elf.h
··· 247 247 #define ELF_PLATFORM ("PARISC\0") 248 248 249 249 #define SET_PERSONALITY(ex) \ 250 - current->personality = PER_LINUX; \ 250 + set_personality((current->personality & ~PER_MASK) | PER_LINUX); \ 251 251 current->thread.map_base = DEFAULT_MAP_BASE; \ 252 252 current->thread.task_size = DEFAULT_TASK_SIZE \ 253 253