diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:14:36 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:15:32 -0500 |
commit | 26689452f5ca201add63b1b1ff0dbcf82d6885e7 (patch) | |
tree | 04fd8fa7b9dec6154166b0b8fcb962d05b067a45 /arch/s390/kernel/signal.c | |
parent | 2b66421995d2e93c9d1a0111acf2581f8529c6e5 (diff) |
[CVE-2009-0029] s390 specific system call wrappers
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/signal.c')
-rw-r--r-- | arch/s390/kernel/signal.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 8e6812a22670..3cf74c3ccb69 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/personality.h> | 25 | #include <linux/personality.h> |
26 | #include <linux/binfmts.h> | 26 | #include <linux/binfmts.h> |
27 | #include <linux/tracehook.h> | 27 | #include <linux/tracehook.h> |
28 | #include <linux/syscalls.h> | ||
28 | #include <asm/ucontext.h> | 29 | #include <asm/ucontext.h> |
29 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
30 | #include <asm/lowcore.h> | 31 | #include <asm/lowcore.h> |
@@ -53,8 +54,7 @@ typedef struct | |||
53 | /* | 54 | /* |
54 | * Atomically swap in the new signal mask, and wait for a signal. | 55 | * Atomically swap in the new signal mask, and wait for a signal. |
55 | */ | 56 | */ |
56 | asmlinkage int | 57 | SYSCALL_DEFINE3(sigsuspend, int, history0, int, history1, old_sigset_t, mask) |
57 | sys_sigsuspend(int history0, int history1, old_sigset_t mask) | ||
58 | { | 58 | { |
59 | mask &= _BLOCKABLE; | 59 | mask &= _BLOCKABLE; |
60 | spin_lock_irq(¤t->sighand->siglock); | 60 | spin_lock_irq(¤t->sighand->siglock); |
@@ -70,9 +70,8 @@ sys_sigsuspend(int history0, int history1, old_sigset_t mask) | |||
70 | return -ERESTARTNOHAND; | 70 | return -ERESTARTNOHAND; |
71 | } | 71 | } |
72 | 72 | ||
73 | asmlinkage long | 73 | SYSCALL_DEFINE3(sigaction, int, sig, const struct old_sigaction __user *, act, |
74 | sys_sigaction(int sig, const struct old_sigaction __user *act, | 74 | struct old_sigaction __user *, oact) |
75 | struct old_sigaction __user *oact) | ||
76 | { | 75 | { |
77 | struct k_sigaction new_ka, old_ka; | 76 | struct k_sigaction new_ka, old_ka; |
78 | int ret; | 77 | int ret; |
@@ -102,15 +101,13 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
102 | return ret; | 101 | return ret; |
103 | } | 102 | } |
104 | 103 | ||
105 | asmlinkage long | 104 | SYSCALL_DEFINE2(sigaltstack, const stack_t __user *, uss, |
106 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss) | 105 | stack_t __user *, uoss) |
107 | { | 106 | { |
108 | struct pt_regs *regs = task_pt_regs(current); | 107 | struct pt_regs *regs = task_pt_regs(current); |
109 | return do_sigaltstack(uss, uoss, regs->gprs[15]); | 108 | return do_sigaltstack(uss, uoss, regs->gprs[15]); |
110 | } | 109 | } |
111 | 110 | ||
112 | |||
113 | |||
114 | /* Returns non-zero on fault. */ | 111 | /* Returns non-zero on fault. */ |
115 | static int save_sigregs(struct pt_regs *regs, _sigregs __user *sregs) | 112 | static int save_sigregs(struct pt_regs *regs, _sigregs __user *sregs) |
116 | { | 113 | { |
@@ -164,7 +161,7 @@ static int restore_sigregs(struct pt_regs *regs, _sigregs __user *sregs) | |||
164 | return 0; | 161 | return 0; |
165 | } | 162 | } |
166 | 163 | ||
167 | asmlinkage long sys_sigreturn(void) | 164 | SYSCALL_DEFINE0(sigreturn) |
168 | { | 165 | { |
169 | struct pt_regs *regs = task_pt_regs(current); | 166 | struct pt_regs *regs = task_pt_regs(current); |
170 | sigframe __user *frame = (sigframe __user *)regs->gprs[15]; | 167 | sigframe __user *frame = (sigframe __user *)regs->gprs[15]; |
@@ -191,7 +188,7 @@ badframe: | |||
191 | return 0; | 188 | return 0; |
192 | } | 189 | } |
193 | 190 | ||
194 | asmlinkage long sys_rt_sigreturn(void) | 191 | SYSCALL_DEFINE0(rt_sigreturn) |
195 | { | 192 | { |
196 | struct pt_regs *regs = task_pt_regs(current); | 193 | struct pt_regs *regs = task_pt_regs(current); |
197 | rt_sigframe __user *frame = (rt_sigframe __user *)regs->gprs[15]; | 194 | rt_sigframe __user *frame = (rt_sigframe __user *)regs->gprs[15]; |