From 08d4f65352f9464f1dd7d65d0bc27d57abf3d161 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 23 Dec 2012 03:06:03 -0500 Subject: m68k: switch to generic sigaltstack Signed-off-by: Al Viro --- arch/m68k/kernel/signal.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'arch/m68k/kernel') diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c index 9a396cda314..41a34de4b4b 100644 --- a/arch/m68k/kernel/signal.c +++ b/arch/m68k/kernel/signal.c @@ -267,13 +267,6 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, return ret; } -asmlinkage int -sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss) -{ - return do_sigaltstack(uss, uoss, rdusp()); -} - - /* * Do a signal return; undo the signal stack. * @@ -765,8 +758,9 @@ rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw, err |= __get_user(temp, &uc->uc_formatvec); err |= rt_restore_fpu_state(uc); + err |= restore_altstack(&uc->uc_stack); - if (err || do_sigaltstack(&uc->uc_stack, NULL, usp) == -EFAULT) + if (err) goto badframe; if (mangle_kernel_stack(regs, temp, &uc->uc_extra)) @@ -1014,11 +1008,7 @@ static int setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info, /* Create the ucontext. */ err |= __put_user(0, &frame->uc.uc_flags); err |= __put_user(NULL, &frame->uc.uc_link); - err |= __put_user((void __user *)current->sas_ss_sp, - &frame->uc.uc_stack.ss_sp); - err |= __put_user(sas_ss_flags(rdusp()), - &frame->uc.uc_stack.ss_flags); - err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); + err |= __save_altstack(&frame->uc.uc_stack, rdusp()); err |= rt_setup_ucontext(&frame->uc, regs); err |= copy_to_user (&frame->uc.uc_sigmask, set, sizeof(*set)); -- cgit v1.2.3-18-g5258 From 1ba3e7efb60b4d7d4f75f084214b90bd0fdaa319 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 25 Dec 2012 16:26:28 -0500 Subject: m68k: switch to generic old sigsuspend Signed-off-by: Al Viro --- arch/m68k/kernel/signal.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'arch/m68k/kernel') diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c index 41a34de4b4b..b5c6b4d9d1a 100644 --- a/arch/m68k/kernel/signal.c +++ b/arch/m68k/kernel/signal.c @@ -224,17 +224,6 @@ static inline void push_cache(unsigned long vaddr) #endif /* CONFIG_MMU */ -/* - * Atomically swap in the new signal mask, and wait for a signal. - */ -asmlinkage int -sys_sigsuspend(int unused0, int unused1, old_sigset_t mask) -{ - sigset_t blocked; - siginitset(&blocked, mask); - return sigsuspend(&blocked); -} - asmlinkage int sys_sigaction(int sig, const struct old_sigaction __user *act, struct old_sigaction __user *oact) -- cgit v1.2.3-18-g5258 From 8be433ab55d5058327e82f124f1eb0b37e4540b1 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 25 Dec 2012 19:29:01 -0500 Subject: m68k: switch to generic old sigaction() Signed-off-by: Al Viro --- arch/m68k/kernel/signal.c | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'arch/m68k/kernel') diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c index b5c6b4d9d1a..2a16df3d931 100644 --- a/arch/m68k/kernel/signal.c +++ b/arch/m68k/kernel/signal.c @@ -224,38 +224,6 @@ static inline void push_cache(unsigned long vaddr) #endif /* CONFIG_MMU */ -asmlinkage int -sys_sigaction(int sig, const struct old_sigaction __user *act, - struct old_sigaction __user *oact) -{ - struct k_sigaction new_ka, old_ka; - int ret; - - if (act) { - old_sigset_t mask; - if (!access_ok(VERIFY_READ, act, sizeof(*act)) || - __get_user(new_ka.sa.sa_handler, &act->sa_handler) || - __get_user(new_ka.sa.sa_restorer, &act->sa_restorer) || - __get_user(new_ka.sa.sa_flags, &act->sa_flags) || - __get_user(mask, &act->sa_mask)) - return -EFAULT; - siginitset(&new_ka.sa.sa_mask, mask); - } - - ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); - - if (!ret && oact) { - if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || - __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || - __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer) || - __put_user(old_ka.sa.sa_flags, &oact->sa_flags) || - __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask)) - return -EFAULT; - } - - return ret; -} - /* * Do a signal return; undo the signal stack. * -- cgit v1.2.3-18-g5258