All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] parisc: fix personality on 32bit kernel
@ 2013-02-09 23:11 Helge Deller
  0 siblings, 0 replies; only message in thread
From: Helge Deller @ 2013-02-09 23:11 UTC (permalink / raw)
  To: linux-parisc, James Bottomley

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>

diff --git a/arch/parisc/include/asm/elf.h b/arch/parisc/include/asm/elf.h
index 19f6cb1..ad2b503 100644
--- a/arch/parisc/include/asm/elf.h
+++ b/arch/parisc/include/asm/elf.h
@@ -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 \
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-02-09 23:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-09 23:11 [PATCH] parisc: fix personality on 32bit kernel Helge Deller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.