aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-23 21:50:11 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-23 21:50:11 -0500
commit9e2d59ad580d590134285f361a0e80f0e98c0207 (patch)
treef3232be75781484193413f32ec82c21f6d8eb76e /arch/ia64
parent5ce1a70e2f00f0bce0cab57f798ca354b9496169 (diff)
parent235b80226b986dabcbba844968f7807866bd0bfe (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
Pull signal handling cleanups from Al Viro: "This is the first pile; another one will come a bit later and will contain SYSCALL_DEFINE-related patches. - a bunch of signal-related syscalls (both native and compat) unified. - a bunch of compat syscalls switched to COMPAT_SYSCALL_DEFINE (fixing several potential problems with missing argument validation, while we are at it) - a lot of now-pointless wrappers killed - a couple of architectures (cris and hexagon) forgot to save altstack settings into sigframe, even though they used the (uninitialized) values in sigreturn; fixed. - microblaze fixes for delivery of multiple signals arriving at once - saner set of helpers for signal delivery introduced, several architectures switched to using those." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (143 commits) x86: convert to ksignal sparc: convert to ksignal arm: switch to struct ksignal * passing alpha: pass k_sigaction and siginfo_t using ksignal pointer burying unused conditionals make do_sigaltstack() static arm64: switch to generic old sigaction() (compat-only) arm64: switch to generic compat rt_sigaction() arm64: switch compat to generic old sigsuspend arm64: switch to generic compat rt_sigqueueinfo() arm64: switch to generic compat rt_sigpending() arm64: switch to generic compat rt_sigprocmask() arm64: switch to generic sigaltstack sparc: switch to generic old sigsuspend sparc: COMPAT_SYSCALL_DEFINE does all sign-extension as well as SYSCALL_DEFINE sparc: kill sign-extending wrappers for native syscalls kill sparc32_open() sparc: switch to use of generic old sigaction sparc: switch sys_compat_rt_sigaction() to COMPAT_SYSCALL_DEFINE mips: switch to generic sys_fork() and sys_clone() ...
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/include/asm/signal.h10
-rw-r--r--arch/ia64/include/asm/unistd.h8
-rw-r--r--arch/ia64/kernel/signal.c19
3 files changed, 3 insertions, 34 deletions
diff --git a/arch/ia64/include/asm/signal.h b/arch/ia64/include/asm/signal.h
index 3a1b20e74c5c..c62afa4a0dc2 100644
--- a/arch/ia64/include/asm/signal.h
+++ b/arch/ia64/include/asm/signal.h
@@ -26,16 +26,6 @@ typedef struct {
26 unsigned long sig[_NSIG_WORDS]; 26 unsigned long sig[_NSIG_WORDS];
27} sigset_t; 27} sigset_t;
28 28
29struct sigaction {
30 __sighandler_t sa_handler;
31 unsigned long sa_flags;
32 sigset_t sa_mask; /* mask last for extensibility */
33};
34
35struct k_sigaction {
36 struct sigaction sa;
37};
38
39# include <asm/sigcontext.h> 29# include <asm/sigcontext.h>
40 30
41# endif /* !__ASSEMBLY__ */ 31# endif /* !__ASSEMBLY__ */
diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h
index c3cc42a15af1..096373800f73 100644
--- a/arch/ia64/include/asm/unistd.h
+++ b/arch/ia64/include/asm/unistd.h
@@ -27,9 +27,6 @@
27#define __IGNORE_vfork /* clone() */ 27#define __IGNORE_vfork /* clone() */
28#define __IGNORE_umount2 /* umount() */ 28#define __IGNORE_umount2 /* umount() */
29 29
30#define __ARCH_WANT_SYS_RT_SIGACTION
31#define __ARCH_WANT_SYS_RT_SIGSUSPEND
32
33#if !defined(__ASSEMBLY__) && !defined(ASSEMBLER) 30#if !defined(__ASSEMBLY__) && !defined(ASSEMBLER)
34 31
35#include <linux/types.h> 32#include <linux/types.h>
@@ -47,12 +44,7 @@ asmlinkage unsigned long sys_mmap2(
47 int prot, int flags, 44 int prot, int flags,
48 int fd, long pgoff); 45 int fd, long pgoff);
49struct pt_regs; 46struct pt_regs;
50struct sigaction;
51asmlinkage long sys_ia64_pipe(void); 47asmlinkage long sys_ia64_pipe(void);
52asmlinkage long sys_rt_sigaction(int sig,
53 const struct sigaction __user *act,
54 struct sigaction __user *oact,
55 size_t sigsetsize);
56 48
57/* 49/*
58 * "Conditional" syscalls 50 * "Conditional" syscalls
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
index 680b73786be8..3637e03d2282 100644
--- a/arch/ia64/kernel/signal.c
+++ b/arch/ia64/kernel/signal.c
@@ -39,14 +39,6 @@
39# define GET_SIGSET(k,u) __get_user((k)->sig[0], &(u)->sig[0]) 39# define GET_SIGSET(k,u) __get_user((k)->sig[0], &(u)->sig[0])
40#endif 40#endif
41 41
42asmlinkage long
43sys_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, long arg2,
44 long arg3, long arg4, long arg5, long arg6, long arg7,
45 struct pt_regs regs)
46{
47 return do_sigaltstack(uss, uoss, regs.r12);
48}
49
50static long 42static long
51restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr) 43restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr)
52{ 44{
@@ -208,11 +200,8 @@ ia64_rt_sigreturn (struct sigscratch *scr)
208 printk("SIG return (%s:%d): sp=%lx ip=%lx\n", 200 printk("SIG return (%s:%d): sp=%lx ip=%lx\n",
209 current->comm, current->pid, scr->pt.r12, scr->pt.cr_iip); 201 current->comm, current->pid, scr->pt.r12, scr->pt.cr_iip);
210#endif 202#endif
211 /* 203 if (restore_altstack(&sc->sc_stack))
212 * It is more difficult to avoid calling this function than to 204 goto give_sigsegv;
213 * call it and ignore errors.
214 */
215 do_sigaltstack(&sc->sc_stack, NULL, scr->pt.r12);
216 return retval; 205 return retval;
217 206
218 give_sigsegv: 207 give_sigsegv:
@@ -376,9 +365,7 @@ setup_frame (int sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *set,
376 365
377 err |= copy_siginfo_to_user(&frame->info, info); 366 err |= copy_siginfo_to_user(&frame->info, info);
378 367
379 err |= __put_user(current->sas_ss_sp, &frame->sc.sc_stack.ss_sp); 368 err |= __save_altstack(&frame->sc.sc_stack, scr->pt.r12);
380 err |= __put_user(current->sas_ss_size, &frame->sc.sc_stack.ss_size);
381 err |= __put_user(sas_ss_flags(scr->pt.r12), &frame->sc.sc_stack.ss_flags);
382 err |= setup_sigcontext(&frame->sc, set, scr); 369 err |= setup_sigcontext(&frame->sc, set, scr);
383 370
384 if (unlikely(err)) 371 if (unlikely(err))