diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-25 18:51:57 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 18:16:10 -0500 |
commit | 5aa1cde2edbc64403a6b06aaa8723cca11c12681 (patch) | |
tree | eb610d50b29cb876874d10e94f2f510902e8b30c /arch | |
parent | a31dd96ff7037538dcd98680715e5106e691c26e (diff) |
powerpc: switch to generic compat rt_sigaction()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/Kconfig | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/ppc32.h | 9 | ||||
-rw-r--r-- | arch/powerpc/kernel/signal_32.c | 30 |
3 files changed, 1 insertions, 39 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 09b177bdef66..bec7808b7b0f 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -145,6 +145,7 @@ config PPC | |||
145 | select MODULES_USE_ELF_RELA | 145 | select MODULES_USE_ELF_RELA |
146 | select CLONE_BACKWARDS | 146 | select CLONE_BACKWARDS |
147 | select GENERIC_SIGALTSTACK | 147 | select GENERIC_SIGALTSTACK |
148 | select GENERIC_COMPAT_RT_SIGACTION | ||
148 | select GENERIC_COMPAT_RT_SIGQUEUEINFO | 149 | select GENERIC_COMPAT_RT_SIGQUEUEINFO |
149 | select GENERIC_COMPAT_RT_SIGPROCMASK | 150 | select GENERIC_COMPAT_RT_SIGPROCMASK |
150 | select GENERIC_COMPAT_RT_SIGPENDING | 151 | select GENERIC_COMPAT_RT_SIGPENDING |
diff --git a/arch/powerpc/kernel/ppc32.h b/arch/powerpc/kernel/ppc32.h index f6bee3e6f438..fe92b0d0603a 100644 --- a/arch/powerpc/kernel/ppc32.h +++ b/arch/powerpc/kernel/ppc32.h | |||
@@ -25,15 +25,6 @@ struct __old_sigaction32 { | |||
25 | compat_uptr_t sa_restorer; /* not used by Linux/SPARC yet */ | 25 | compat_uptr_t sa_restorer; /* not used by Linux/SPARC yet */ |
26 | }; | 26 | }; |
27 | 27 | ||
28 | |||
29 | |||
30 | struct sigaction32 { | ||
31 | compat_uptr_t sa_handler; /* Really a pointer, but need to deal with 32 bits */ | ||
32 | unsigned int sa_flags; | ||
33 | compat_uptr_t sa_restorer; /* Another 32 bit pointer */ | ||
34 | compat_sigset_t sa_mask; /* A 32 bit mask */ | ||
35 | }; | ||
36 | |||
37 | struct pt_regs32 { | 28 | struct pt_regs32 { |
38 | unsigned int gpr[32]; | 29 | unsigned int gpr[32]; |
39 | unsigned int nip; | 30 | unsigned int nip; |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 488a7c542a3a..16ec1c9899ad 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -579,36 +579,6 @@ static long restore_user_regs(struct pt_regs *regs, | |||
579 | } | 579 | } |
580 | 580 | ||
581 | #ifdef CONFIG_PPC64 | 581 | #ifdef CONFIG_PPC64 |
582 | long compat_sys_rt_sigaction(int sig, const struct sigaction32 __user *act, | ||
583 | struct sigaction32 __user *oact, size_t sigsetsize) | ||
584 | { | ||
585 | struct k_sigaction new_ka, old_ka; | ||
586 | int ret; | ||
587 | |||
588 | /* XXX: Don't preclude handling different sized sigset_t's. */ | ||
589 | if (sigsetsize != sizeof(compat_sigset_t)) | ||
590 | return -EINVAL; | ||
591 | |||
592 | if (act) { | ||
593 | compat_uptr_t handler; | ||
594 | |||
595 | ret = get_user(handler, &act->sa_handler); | ||
596 | new_ka.sa.sa_handler = compat_ptr(handler); | ||
597 | ret |= get_sigset_t(&new_ka.sa.sa_mask, &act->sa_mask); | ||
598 | ret |= __get_user(new_ka.sa.sa_flags, &act->sa_flags); | ||
599 | if (ret) | ||
600 | return -EFAULT; | ||
601 | } | ||
602 | |||
603 | ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); | ||
604 | if (!ret && oact) { | ||
605 | ret = put_user(to_user_ptr(old_ka.sa.sa_handler), &oact->sa_handler); | ||
606 | ret |= put_sigset_t(&oact->sa_mask, &old_ka.sa.sa_mask); | ||
607 | ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | ||
608 | } | ||
609 | return ret; | ||
610 | } | ||
611 | |||
612 | int copy_siginfo_to_user32(struct compat_siginfo __user *d, siginfo_t *s) | 582 | int copy_siginfo_to_user32(struct compat_siginfo __user *d, siginfo_t *s) |
613 | { | 583 | { |
614 | int err; | 584 | int err; |