diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-23 03:08:53 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 18:16:01 -0500 |
commit | 4a9d32d377e1facca204cc1c6856406be8b53fa3 (patch) | |
tree | a63e86ba6ef195c88660d2a36f474c3a81d1ab6a /arch/microblaze | |
parent | 0aa0203fb43f04714004b2c4ad33b858e240555d (diff) |
microblaze: switch to generic sigaltstack
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/Kconfig | 1 | ||||
-rw-r--r-- | arch/microblaze/kernel/signal.c | 17 |
2 files changed, 3 insertions, 15 deletions
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index ba3b7c8c04b8..5e30d75c74ed 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
@@ -27,6 +27,7 @@ config MICROBLAZE | |||
27 | select GENERIC_CLOCKEVENTS | 27 | select GENERIC_CLOCKEVENTS |
28 | select MODULES_USE_ELF_RELA | 28 | select MODULES_USE_ELF_RELA |
29 | select CLONE_BACKWARDS | 29 | select CLONE_BACKWARDS |
30 | select GENERIC_SIGALTSTACK | ||
30 | 31 | ||
31 | config SWAP | 32 | config SWAP |
32 | def_bool n | 33 | def_bool n |
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c index ac3d0a0f4814..dfd61e2f1189 100644 --- a/arch/microblaze/kernel/signal.c +++ b/arch/microblaze/kernel/signal.c | |||
@@ -41,13 +41,6 @@ | |||
41 | #include <asm/cacheflush.h> | 41 | #include <asm/cacheflush.h> |
42 | #include <asm/syscalls.h> | 42 | #include <asm/syscalls.h> |
43 | 43 | ||
44 | asmlinkage long | ||
45 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | ||
46 | struct pt_regs *regs) | ||
47 | { | ||
48 | return do_sigaltstack(uss, uoss, regs->r1); | ||
49 | } | ||
50 | |||
51 | /* | 44 | /* |
52 | * Do a signal return; undo the signal stack. | 45 | * Do a signal return; undo the signal stack. |
53 | */ | 46 | */ |
@@ -109,9 +102,7 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) | |||
109 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &rval)) | 102 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &rval)) |
110 | goto badframe; | 103 | goto badframe; |
111 | 104 | ||
112 | /* It is more difficult to avoid calling this function than to | 105 | if (restore_altstack(&frame->uc.uc_stack)) |
113 | call it and ignore errors. */ | ||
114 | if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->r1) == -EFAULT) | ||
115 | goto badframe; | 106 | goto badframe; |
116 | 107 | ||
117 | return rval; | 108 | return rval; |
@@ -194,11 +185,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
194 | /* Create the ucontext. */ | 185 | /* Create the ucontext. */ |
195 | err |= __put_user(0, &frame->uc.uc_flags); | 186 | err |= __put_user(0, &frame->uc.uc_flags); |
196 | err |= __put_user(NULL, &frame->uc.uc_link); | 187 | err |= __put_user(NULL, &frame->uc.uc_link); |
197 | err |= __put_user((void __user *)current->sas_ss_sp, | 188 | err |= __save_altstack(&frame->uc.uc_stack, regs->r1); |
198 | &frame->uc.uc_stack.ss_sp); | ||
199 | err |= __put_user(sas_ss_flags(regs->r1), | ||
200 | &frame->uc.uc_stack.ss_flags); | ||
201 | err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); | ||
202 | err |= setup_sigcontext(&frame->uc.uc_mcontext, | 189 | err |= setup_sigcontext(&frame->uc.uc_mcontext, |
203 | regs, set->sig[0]); | 190 | regs, set->sig[0]); |
204 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); | 191 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); |