Commit df570b9c284701d08b22aa00cbfcf870b7f1b7c1

Authored by Kyle McMartin
Committed by Matthew Wilcox
1 parent 8f611c453c

[PARISC] Switch is_compat_task to use TIF_32BIT

Stop using PER_LINUX32 to designate processes needing
compaterizing. Convert is_compat_task to use TIF_32BIT and
set TIF_32BIT in binfmt_elf32.c

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>

Showing 4 changed files with 6 additions and 29 deletions Side-by-side Diff

arch/parisc/kernel/binfmt_elf32.c
... ... @@ -87,7 +87,7 @@
87 87 */
88 88  
89 89 #define SET_PERSONALITY(ex, ibcs2) \
90   - current->personality = PER_LINUX32; \
  90 + set_thread_flag(TIF_32BIT); \
91 91 current->thread.map_base = DEFAULT_MAP_BASE32; \
92 92 current->thread.task_size = DEFAULT_TASK_SIZE32 \
93 93  
... ... @@ -102,26 +102,4 @@
102 102 }
103 103  
104 104 #include "../../../fs/binfmt_elf.c"
105   -
106   -/* Set up a separate execution domain for ELF32 binaries running
107   - * on an ELF64 kernel */
108   -
109   -static struct exec_domain parisc32_exec_domain = {
110   - .name = "Linux/ELF32",
111   - .pers_low = PER_LINUX32,
112   - .pers_high = PER_LINUX32,
113   -};
114   -
115   -static int __init parisc32_exec_init(void)
116   -{
117   - /* steal the identity signal mappings from the default domain */
118   - parisc32_exec_domain.signal_map = default_exec_domain.signal_map;
119   - parisc32_exec_domain.signal_invmap = default_exec_domain.signal_invmap;
120   -
121   - register_exec_domain(&parisc32_exec_domain);
122   -
123   - return 0;
124   -}
125   -
126   -__initcall(parisc32_exec_init);
arch/parisc/kernel/signal.c
... ... @@ -26,7 +26,6 @@
26 26 #include <linux/stddef.h>
27 27 #include <linux/compat.h>
28 28 #include <linux/elf.h>
29   -#include <linux/personality.h>
30 29 #include <asm/ucontext.h>
31 30 #include <asm/rt_sigframe.h>
32 31 #include <asm/uaccess.h>
33 32  
... ... @@ -433,13 +432,13 @@
433 432 if (in_syscall) {
434 433 regs->gr[31] = haddr;
435 434 #ifdef __LP64__
436   - if (personality(current->personality) == PER_LINUX)
  435 + if (!test_thread_flag(TIF_32BIT))
437 436 sigframe_size |= 1;
438 437 #endif
439 438 } else {
440 439 unsigned long psw = USER_PSW;
441 440 #ifdef __LP64__
442   - if (personality(current->personality) == PER_LINUX)
  441 + if (!test_thread_flag(TIF_32BIT))
443 442 psw |= PSW_W;
444 443 #endif
445 444  
include/asm-parisc/compat.h
... ... @@ -5,7 +5,7 @@
5 5 */
6 6 #include <linux/types.h>
7 7 #include <linux/sched.h>
8   -#include <linux/personality.h>
  8 +#include <linux/thread_info.h>
9 9  
10 10 #define COMPAT_USER_HZ 100
11 11  
... ... @@ -152,7 +152,7 @@
152 152  
153 153 static inline int __is_compat_task(struct task_struct *t)
154 154 {
155   - return personality(t->personality) == PER_LINUX32;
  155 + return test_ti_thread_flag(t->thread_info, TIF_32BIT);
156 156 }
157 157  
158 158 static inline int is_compat_task(void)
include/asm-parisc/processor.h
... ... @@ -278,7 +278,7 @@
278 278 */
279 279  
280 280 #ifdef __LP64__
281   -#define USER_WIDE_MODE (personality(current->personality) == PER_LINUX)
  281 +#define USER_WIDE_MODE (!test_thread_flag(TIF_32BIT))
282 282 #else
283 283 #define USER_WIDE_MODE 0
284 284 #endif