aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/Kconfig1
-rw-r--r--arch/mips/kernel/scall64-n32.S2
-rw-r--r--arch/mips/kernel/scall64-o32.S2
-rw-r--r--arch/mips/kernel/signal32.c54
4 files changed, 5 insertions, 54 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index b1e885f31703..7352acfe70b7 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -42,6 +42,7 @@ config MIPS
42 select MODULES_USE_ELF_REL if MODULES 42 select MODULES_USE_ELF_REL if MODULES
43 select MODULES_USE_ELF_RELA if MODULES && 64BIT 43 select MODULES_USE_ELF_RELA if MODULES && 64BIT
44 select GENERIC_SIGALTSTACK 44 select GENERIC_SIGALTSTACK
45 select GENERIC_COMPAT_RT_SIGACTION
45 select GENERIC_COMPAT_RT_SIGQUEUEINFO 46 select GENERIC_COMPAT_RT_SIGQUEUEINFO
46 select GENERIC_COMPAT_RT_SIGPROCMASK 47 select GENERIC_COMPAT_RT_SIGPROCMASK
47 select GENERIC_COMPAT_RT_SIGPENDING 48 select GENERIC_COMPAT_RT_SIGPENDING
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index 5dfeba49ab4f..572ab50ff098 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -117,7 +117,7 @@ EXPORT(sysn32_call_table)
117 PTR sys_mprotect /* 6010 */ 117 PTR sys_mprotect /* 6010 */
118 PTR sys_munmap 118 PTR sys_munmap
119 PTR sys_brk 119 PTR sys_brk
120 PTR sys_32_rt_sigaction 120 PTR compat_sys_rt_sigaction
121 PTR compat_sys_rt_sigprocmask 121 PTR compat_sys_rt_sigprocmask
122 PTR compat_sys_ioctl /* 6015 */ 122 PTR compat_sys_ioctl /* 6015 */
123 PTR sys_pread64 123 PTR sys_pread64
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 6623077a9488..aa29c3318fbc 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -386,7 +386,7 @@ sys_call_table:
386 PTR sys_getresgid 386 PTR sys_getresgid
387 PTR sys_prctl 387 PTR sys_prctl
388 PTR sys32_rt_sigreturn 388 PTR sys32_rt_sigreturn
389 PTR sys_32_rt_sigaction 389 PTR compat_sys_rt_sigaction
390 PTR compat_sys_rt_sigprocmask /* 4195 */ 390 PTR compat_sys_rt_sigprocmask /* 4195 */
391 PTR compat_sys_rt_sigpending 391 PTR compat_sys_rt_sigpending
392 PTR compat_sys_rt_sigtimedwait 392 PTR compat_sys_rt_sigtimedwait
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index 0b1f57111eae..ad7c2be0c33d 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -55,12 +55,6 @@ extern asmlinkage int fpu_emulator_restore_context32(struct sigcontext32 __user
55typedef unsigned int __sighandler32_t; 55typedef unsigned int __sighandler32_t;
56typedef void (*vfptr_t)(void); 56typedef void (*vfptr_t)(void);
57 57
58struct sigaction32 {
59 unsigned int sa_flags;
60 __sighandler32_t sa_handler;
61 compat_sigset_t sa_mask;
62};
63
64struct ucontext32 { 58struct ucontext32 {
65 u32 uc_flags; 59 u32 uc_flags;
66 s32 uc_link; 60 s32 uc_link;
@@ -278,8 +272,8 @@ asmlinkage int sys32_sigsuspend(compat_sigset_t __user *uset)
278 return compat_sys_rt_sigsuspend(uset, sizeof(compat_sigset_t)); 272 return compat_sys_rt_sigsuspend(uset, sizeof(compat_sigset_t));
279} 273}
280 274
281SYSCALL_DEFINE3(32_sigaction, long, sig, const struct sigaction32 __user *, act, 275SYSCALL_DEFINE3(32_sigaction, long, sig, const struct compat_sigaction __user *, act,
282 struct sigaction32 __user *, oact) 276 struct compat_sigaction __user *, oact)
283{ 277{
284 struct k_sigaction new_ka, old_ka; 278 struct k_sigaction new_ka, old_ka;
285 int ret; 279 int ret;
@@ -564,50 +558,6 @@ struct mips_abi mips_abi_32 = {
564 .restart = __NR_O32_restart_syscall 558 .restart = __NR_O32_restart_syscall
565}; 559};
566 560
567SYSCALL_DEFINE4(32_rt_sigaction, int, sig,
568 const struct sigaction32 __user *, act,
569 struct sigaction32 __user *, oact, unsigned int, sigsetsize)
570{
571 struct k_sigaction new_sa, old_sa;
572 int ret = -EINVAL;
573
574 /* XXX: Don't preclude handling different sized sigset_t's. */
575 if (sigsetsize != sizeof(sigset_t))
576 goto out;
577
578 if (act) {
579 s32 handler;
580 int err = 0;
581
582 if (!access_ok(VERIFY_READ, act, sizeof(*act)))
583 return -EFAULT;
584 err |= __get_user(handler, &act->sa_handler);
585 new_sa.sa.sa_handler = (void __user *)(s64)handler;
586 err |= __get_user(new_sa.sa.sa_flags, &act->sa_flags);
587 err |= get_sigset(&new_sa.sa.sa_mask, &act->sa_mask);
588 if (err)
589 return -EFAULT;
590 }
591
592 ret = do_sigaction(sig, act ? &new_sa : NULL, oact ? &old_sa : NULL);
593
594 if (!ret && oact) {
595 int err = 0;
596
597 if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)))
598 return -EFAULT;
599
600 err |= __put_user((u32)(u64)old_sa.sa.sa_handler,
601 &oact->sa_handler);
602 err |= __put_user(old_sa.sa.sa_flags, &oact->sa_flags);
603 err |= put_sigset(&old_sa.sa.sa_mask, &oact->sa_mask);
604 if (err)
605 return -EFAULT;
606 }
607out:
608 return ret;
609}
610
611static int signal32_init(void) 561static int signal32_init(void)
612{ 562{
613 if (cpu_has_fpu) { 563 if (cpu_has_fpu) {