aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/kernel/signal.c')
-rw-r--r--arch/parisc/kernel/signal.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
index cc38edfd90c5..bb83880c5ee3 100644
--- a/arch/parisc/kernel/signal.c
+++ b/arch/parisc/kernel/signal.c
@@ -76,7 +76,7 @@ sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, struct pt_regs *r
76#ifdef __LP64__ 76#ifdef __LP64__
77 compat_sigset_t newset32; 77 compat_sigset_t newset32;
78 78
79 if(personality(current->personality) == PER_LINUX32){ 79 if (is_compat_task()) {
80 /* XXX: Don't preclude handling different sized sigset_t's. */ 80 /* XXX: Don't preclude handling different sized sigset_t's. */
81 if (sigsetsize != sizeof(compat_sigset_t)) 81 if (sigsetsize != sizeof(compat_sigset_t))
82 return -EINVAL; 82 return -EINVAL;
@@ -153,7 +153,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
153 compat_sigset_t compat_set; 153 compat_sigset_t compat_set;
154 struct compat_rt_sigframe __user * compat_frame; 154 struct compat_rt_sigframe __user * compat_frame;
155 155
156 if(personality(current->personality) == PER_LINUX32) 156 if (is_compat_task())
157 sigframe_size = PARISC_RT_SIGFRAME_SIZE32; 157 sigframe_size = PARISC_RT_SIGFRAME_SIZE32;
158#endif 158#endif
159 159
@@ -166,7 +166,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
166#ifdef __LP64__ 166#ifdef __LP64__
167 compat_frame = (struct compat_rt_sigframe __user *)frame; 167 compat_frame = (struct compat_rt_sigframe __user *)frame;
168 168
169 if(personality(current->personality) == PER_LINUX32){ 169 if (is_compat_task()) {
170 DBG(2,"sys_rt_sigreturn: ELF32 process.\n"); 170 DBG(2,"sys_rt_sigreturn: ELF32 process.\n");
171 if (__copy_from_user(&compat_set, &compat_frame->uc.uc_sigmask, sizeof(compat_set))) 171 if (__copy_from_user(&compat_set, &compat_frame->uc.uc_sigmask, sizeof(compat_set)))
172 goto give_sigsegv; 172 goto give_sigsegv;
@@ -186,7 +186,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
186 186
187 /* Good thing we saved the old gr[30], eh? */ 187 /* Good thing we saved the old gr[30], eh? */
188#ifdef __LP64__ 188#ifdef __LP64__
189 if(personality(current->personality) == PER_LINUX32){ 189 if (is_compat_task()) {
190 DBG(1,"sys_rt_sigreturn: compat_frame->uc.uc_mcontext 0x%p\n", 190 DBG(1,"sys_rt_sigreturn: compat_frame->uc.uc_mcontext 0x%p\n",
191 &compat_frame->uc.uc_mcontext); 191 &compat_frame->uc.uc_mcontext);
192// FIXME: Load upper half from register file 192// FIXME: Load upper half from register file
@@ -315,7 +315,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
315 315
316 compat_frame = (struct compat_rt_sigframe __user *)frame; 316 compat_frame = (struct compat_rt_sigframe __user *)frame;
317 317
318 if(personality(current->personality) == PER_LINUX32) { 318 if (is_compat_task()) {
319 DBG(1,"setup_rt_frame: frame->info = 0x%p\n", &compat_frame->info); 319 DBG(1,"setup_rt_frame: frame->info = 0x%p\n", &compat_frame->info);
320 err |= copy_siginfo_to_user32(&compat_frame->info, info); 320 err |= copy_siginfo_to_user32(&compat_frame->info, info);
321 DBG(1,"SETUP_RT_FRAME: 1\n"); 321 DBG(1,"SETUP_RT_FRAME: 1\n");
@@ -392,7 +392,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
392 haddr = A(ka->sa.sa_handler); 392 haddr = A(ka->sa.sa_handler);
393 /* The sa_handler may be a pointer to a function descriptor */ 393 /* The sa_handler may be a pointer to a function descriptor */
394#ifdef __LP64__ 394#ifdef __LP64__
395 if(personality(current->personality) == PER_LINUX32) { 395 if (is_compat_task()) {
396#endif 396#endif
397 if (haddr & PA_PLABEL_FDESC) { 397 if (haddr & PA_PLABEL_FDESC) {
398 Elf32_Fdesc fdesc; 398 Elf32_Fdesc fdesc;
@@ -427,19 +427,19 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
427 */ 427 */
428 sigframe_size = PARISC_RT_SIGFRAME_SIZE; 428 sigframe_size = PARISC_RT_SIGFRAME_SIZE;
429#ifdef __LP64__ 429#ifdef __LP64__
430 if(personality(current->personality) == PER_LINUX32) 430 if (is_compat_task())
431 sigframe_size = PARISC_RT_SIGFRAME_SIZE32; 431 sigframe_size = PARISC_RT_SIGFRAME_SIZE32;
432#endif 432#endif
433 if (in_syscall) { 433 if (in_syscall) {
434 regs->gr[31] = haddr; 434 regs->gr[31] = haddr;
435#ifdef __LP64__ 435#ifdef __LP64__
436 if(personality(current->personality) == PER_LINUX) 436 if (personality(current->personality) == PER_LINUX)
437 sigframe_size |= 1; 437 sigframe_size |= 1;
438#endif 438#endif
439 } else { 439 } else {
440 unsigned long psw = USER_PSW; 440 unsigned long psw = USER_PSW;
441#ifdef __LP64__ 441#ifdef __LP64__
442 if(personality(current->personality) == PER_LINUX) 442 if (personality(current->personality) == PER_LINUX)
443 psw |= PSW_W; 443 psw |= PSW_W;
444#endif 444#endif
445 445
@@ -464,7 +464,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
464 regs->gr[26] = sig; /* signal number */ 464 regs->gr[26] = sig; /* signal number */
465 465
466#ifdef __LP64__ 466#ifdef __LP64__
467 if(personality(current->personality) == PER_LINUX32){ 467 if (is_compat_task()) {
468 regs->gr[25] = A(&compat_frame->info); /* siginfo pointer */ 468 regs->gr[25] = A(&compat_frame->info); /* siginfo pointer */
469 regs->gr[24] = A(&compat_frame->uc); /* ucontext pointer */ 469 regs->gr[24] = A(&compat_frame->uc); /* ucontext pointer */
470 } else 470 } else