aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/signal32.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2006-02-19 09:46:44 -0500
committerRalf Baechle <ralf@linux-mips.org>2006-03-21 08:27:46 -0500
commit9c6031cc93626a194a9ef32d62b078ef1b396c45 (patch)
treeccc33703eb7e47193f06cbe995754efde92e658b /arch/mips/kernel/signal32.c
parent6254944faf5ff96b8b468457e3e2b2dcacc29fb7 (diff)
[MIPS] Signal cleanup
Move function prototypes to asm/signal.h to detect trivial errors and add some __user tags to get rid of sparse warnings. Generated code should not be changed. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/signal32.c')
-rw-r--r--arch/mips/kernel/signal32.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index f2791a1e7609..1c7241ba6924 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -163,7 +163,7 @@ static inline int put_sigset(const sigset_t *kbuf, compat_sigset_t __user *ubuf)
163 return err; 163 return err;
164} 164}
165 165
166static inline int get_sigset(sigset_t *kbuf, const compat_sigset_t *ubuf) 166static inline int get_sigset(sigset_t *kbuf, const compat_sigset_t __user *ubuf)
167{ 167{
168 int err = 0; 168 int err = 0;
169 unsigned long sig[4]; 169 unsigned long sig[4];
@@ -195,10 +195,10 @@ save_static_function(sys32_sigsuspend);
195__attribute_used__ noinline static int 195__attribute_used__ noinline static int
196_sys32_sigsuspend(nabi_no_regargs struct pt_regs regs) 196_sys32_sigsuspend(nabi_no_regargs struct pt_regs regs)
197{ 197{
198 compat_sigset_t *uset; 198 compat_sigset_t __user *uset;
199 sigset_t newset; 199 sigset_t newset;
200 200
201 uset = (compat_sigset_t *) regs.regs[4]; 201 uset = (compat_sigset_t __user *) regs.regs[4];
202 if (get_sigset(&newset, uset)) 202 if (get_sigset(&newset, uset))
203 return -EFAULT; 203 return -EFAULT;
204 sigdelsetmask(&newset, ~_BLOCKABLE); 204 sigdelsetmask(&newset, ~_BLOCKABLE);
@@ -219,7 +219,7 @@ save_static_function(sys32_rt_sigsuspend);
219__attribute_used__ noinline static int 219__attribute_used__ noinline static int
220_sys32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) 220_sys32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
221{ 221{
222 compat_sigset_t *uset; 222 compat_sigset_t __user *uset;
223 sigset_t newset; 223 sigset_t newset;
224 size_t sigsetsize; 224 size_t sigsetsize;
225 225
@@ -228,7 +228,7 @@ _sys32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
228 if (sigsetsize != sizeof(compat_sigset_t)) 228 if (sigsetsize != sizeof(compat_sigset_t))
229 return -EINVAL; 229 return -EINVAL;
230 230
231 uset = (compat_sigset_t *) regs.regs[4]; 231 uset = (compat_sigset_t __user *) regs.regs[4];
232 if (get_sigset(&newset, uset)) 232 if (get_sigset(&newset, uset))
233 return -EFAULT; 233 return -EFAULT;
234 sigdelsetmask(&newset, ~_BLOCKABLE); 234 sigdelsetmask(&newset, ~_BLOCKABLE);
@@ -245,8 +245,8 @@ _sys32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
245 return -ERESTARTNOHAND; 245 return -ERESTARTNOHAND;
246} 246}
247 247
248asmlinkage int sys32_sigaction(int sig, const struct sigaction32 *act, 248asmlinkage int sys32_sigaction(int sig, const struct sigaction32 __user *act,
249 struct sigaction32 *oact) 249 struct sigaction32 __user *oact)
250{ 250{
251 struct k_sigaction new_ka, old_ka; 251 struct k_sigaction new_ka, old_ka;
252 int ret; 252 int ret;
@@ -301,7 +301,7 @@ asmlinkage int sys32_sigaltstack(nabi_no_regargs struct pt_regs regs)
301 if (!access_ok(VERIFY_READ, uss, sizeof(*uss))) 301 if (!access_ok(VERIFY_READ, uss, sizeof(*uss)))
302 return -EFAULT; 302 return -EFAULT;
303 err |= __get_user(sp, &uss->ss_sp); 303 err |= __get_user(sp, &uss->ss_sp);
304 kss.ss_sp = (void *) (long) sp; 304 kss.ss_sp = (void __user *) (long) sp;
305 err |= __get_user(kss.ss_size, &uss->ss_size); 305 err |= __get_user(kss.ss_size, &uss->ss_size);
306 err |= __get_user(kss.ss_flags, &uss->ss_flags); 306 err |= __get_user(kss.ss_flags, &uss->ss_flags);
307 if (err) 307 if (err)
@@ -316,7 +316,7 @@ asmlinkage int sys32_sigaltstack(nabi_no_regargs struct pt_regs regs)
316 if (!ret && uoss) { 316 if (!ret && uoss) {
317 if (!access_ok(VERIFY_WRITE, uoss, sizeof(*uoss))) 317 if (!access_ok(VERIFY_WRITE, uoss, sizeof(*uoss)))
318 return -EFAULT; 318 return -EFAULT;
319 sp = (int) (long) koss.ss_sp; 319 sp = (int) (unsigned long) koss.ss_sp;
320 err |= __put_user(sp, &uoss->ss_sp); 320 err |= __put_user(sp, &uoss->ss_sp);
321 err |= __put_user(koss.ss_size, &uoss->ss_size); 321 err |= __put_user(koss.ss_size, &uoss->ss_size);
322 err |= __put_user(koss.ss_flags, &uoss->ss_flags); 322 err |= __put_user(koss.ss_flags, &uoss->ss_flags);
@@ -527,7 +527,7 @@ _sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
527 /* The ucontext contains a stack32_t, so we must convert! */ 527 /* The ucontext contains a stack32_t, so we must convert! */
528 if (__get_user(sp, &frame->rs_uc.uc_stack.ss_sp)) 528 if (__get_user(sp, &frame->rs_uc.uc_stack.ss_sp))
529 goto badframe; 529 goto badframe;
530 st.ss_sp = (void *)(long) sp; 530 st.ss_sp = (void __user *)(long) sp;
531 if (__get_user(st.ss_size, &frame->rs_uc.uc_stack.ss_size)) 531 if (__get_user(st.ss_size, &frame->rs_uc.uc_stack.ss_size))
532 goto badframe; 532 goto badframe;
533 if (__get_user(st.ss_flags, &frame->rs_uc.uc_stack.ss_flags)) 533 if (__get_user(st.ss_flags, &frame->rs_uc.uc_stack.ss_flags))
@@ -868,7 +868,7 @@ no_signal:
868 } 868 }
869} 869}
870 870
871asmlinkage int sys32_rt_sigaction(int sig, const struct sigaction32 *act, 871asmlinkage int sys32_rt_sigaction(int sig, const struct sigaction32 __user *act,
872 struct sigaction32 __user *oact, 872 struct sigaction32 __user *oact,
873 unsigned int sigsetsize) 873 unsigned int sigsetsize)
874{ 874{
@@ -912,7 +912,7 @@ out:
912 return ret; 912 return ret;
913} 913}
914 914
915asmlinkage int sys32_rt_sigprocmask(int how, compat_sigset_t *set, 915asmlinkage int sys32_rt_sigprocmask(int how, compat_sigset_t __user *set,
916 compat_sigset_t __user *oset, unsigned int sigsetsize) 916 compat_sigset_t __user *oset, unsigned int sigsetsize)
917{ 917{
918 sigset_t old_set, new_set; 918 sigset_t old_set, new_set;