diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-25 13:49:43 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 18:16:08 -0500 |
commit | 451a651d33b240481b063765016472c0be10d350 (patch) | |
tree | 8193ed1c46a6a2077b5b202a496168b5918826f1 /arch/powerpc | |
parent | 7cce246557bf379ea271d91f257ce248362cc12d (diff) |
powerpc: switch to generic compat rt_sigprocmask()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/Kconfig | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/signal_32.c | 35 |
2 files changed, 1 insertions, 35 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index dd52babec7d7..e43cd208dd07 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_SIGPROCMASK | ||
148 | 149 | ||
149 | config EARLY_PRINTK | 150 | config EARLY_PRINTK |
150 | bool | 151 | bool |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 0ea248c893cb..5d2fadcdfba8 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -620,41 +620,6 @@ long compat_sys_rt_sigaction(int sig, const struct sigaction32 __user *act, | |||
620 | return ret; | 620 | return ret; |
621 | } | 621 | } |
622 | 622 | ||
623 | /* | ||
624 | * Note: it is necessary to treat how as an unsigned int, with the | ||
625 | * corresponding cast to a signed int to insure that the proper | ||
626 | * conversion (sign extension) between the register representation | ||
627 | * of a signed int (msr in 32-bit mode) and the register representation | ||
628 | * of a signed int (msr in 64-bit mode) is performed. | ||
629 | */ | ||
630 | long compat_sys_rt_sigprocmask(u32 how, compat_sigset_t __user *set, | ||
631 | compat_sigset_t __user *oset, size_t sigsetsize) | ||
632 | { | ||
633 | sigset_t s; | ||
634 | sigset_t __user *up; | ||
635 | int ret; | ||
636 | mm_segment_t old_fs = get_fs(); | ||
637 | |||
638 | if (set) { | ||
639 | if (get_sigset_t(&s, set)) | ||
640 | return -EFAULT; | ||
641 | } | ||
642 | |||
643 | set_fs(KERNEL_DS); | ||
644 | /* This is valid because of the set_fs() */ | ||
645 | up = (sigset_t __user *) &s; | ||
646 | ret = sys_rt_sigprocmask((int)how, set ? up : NULL, oset ? up : NULL, | ||
647 | sigsetsize); | ||
648 | set_fs(old_fs); | ||
649 | if (ret) | ||
650 | return ret; | ||
651 | if (oset) { | ||
652 | if (put_sigset_t(oset, &s)) | ||
653 | return -EFAULT; | ||
654 | } | ||
655 | return 0; | ||
656 | } | ||
657 | |||
658 | long compat_sys_rt_sigpending(compat_sigset_t __user *set, compat_size_t sigsetsize) | 623 | long compat_sys_rt_sigpending(compat_sigset_t __user *set, compat_size_t sigsetsize) |
659 | { | 624 | { |
660 | sigset_t s; | 625 | sigset_t s; |