From b30c7d50af95f7450f877e8172a2341785bce5ab Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 23 Dec 2012 03:17:06 -0500 Subject: mn10300: switch to generic sigaltstack Signed-off-by: Al Viro --- arch/mn10300/kernel/signal.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'arch/mn10300/kernel') diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c index f570b3085ef9..8223eb371e65 100644 --- a/arch/mn10300/kernel/signal.c +++ b/arch/mn10300/kernel/signal.c @@ -76,14 +76,6 @@ asmlinkage long sys_sigaction(int sig, return ret; } -/* - * set alternate signal stack syscall - */ -asmlinkage long sys_sigaltstack(const stack_t __user *uss, stack_t *uoss) -{ - return do_sigaltstack(uss, uoss, current_frame()->sp); -} - /* * do a signal return; undo the signal stack. */ @@ -193,8 +185,7 @@ asmlinkage long sys_rt_sigreturn(void) if (restore_sigcontext(current_frame(), &frame->uc.uc_mcontext, &d0)) goto badframe; - if (do_sigaltstack(&frame->uc.uc_stack, NULL, current_frame()->sp) == - -EFAULT) + if (restore_altstack(&frame->uc.uc_stack)) goto badframe; return d0; @@ -359,9 +350,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, /* create the ucontext. */ if (__put_user(0, &frame->uc.uc_flags) || __put_user(0, &frame->uc.uc_link) || - __put_user((void *)current->sas_ss_sp, &frame->uc.uc_stack.ss_sp) || - __put_user(sas_ss_flags(regs->sp), &frame->uc.uc_stack.ss_flags) || - __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size) || + __save_altstack(&frame->uc.uc_stack, regs->sp) || setup_sigcontext(&frame->uc.uc_mcontext, &frame->fpuctx, regs, set->sig[0]) || __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set))) -- cgit v1.2.3 From 7d1d990ff161bdd2f0901a0916f35d272adf4c0b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 25 Dec 2012 16:24:21 -0500 Subject: mn10300: switch to generic old sigsuspend Signed-off-by: Al Viro --- arch/mn10300/kernel/signal.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'arch/mn10300/kernel') diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c index 8223eb371e65..d336d64f95f2 100644 --- a/arch/mn10300/kernel/signal.c +++ b/arch/mn10300/kernel/signal.c @@ -31,16 +31,6 @@ #define DEBUG_SIG 0 -/* - * atomically swap in the new signal mask, and wait for a signal. - */ -asmlinkage long sys_sigsuspend(int history0, int history1, old_sigset_t mask) -{ - sigset_t blocked; - siginitset(&blocked, mask); - return sigsuspend(&blocked); -} - /* * set signal action syscall */ -- cgit v1.2.3 From 33f9f78eec7e332dac6bee9cf66cd2bd435b7419 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 25 Dec 2012 19:28:15 -0500 Subject: mn10300: switch to generic old sigaction() Signed-off-by: Al Viro --- arch/mn10300/kernel/signal.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'arch/mn10300/kernel') diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c index d336d64f95f2..9dfac5cd16e6 100644 --- a/arch/mn10300/kernel/signal.c +++ b/arch/mn10300/kernel/signal.c @@ -31,41 +31,6 @@ #define DEBUG_SIG 0 -/* - * set signal action syscall - */ -asmlinkage long 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 (verify_area(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 (verify_area(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