aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/xtensa/kernel/signal.c')
-rw-r--r--arch/xtensa/kernel/signal.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c
index e252b61e45a5..c494f0826fc5 100644
--- a/arch/xtensa/kernel/signal.c
+++ b/arch/xtensa/kernel/signal.c
@@ -104,7 +104,7 @@ sys_sigaction(int sig, const struct old_sigaction *act,
104 104
105 if (act) { 105 if (act) {
106 old_sigset_t mask; 106 old_sigset_t mask;
107 if (verify_area(VERIFY_READ, act, sizeof(*act)) || 107 if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
108 __get_user(new_ka.sa.sa_handler, &act->sa_handler) || 108 __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
109 __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) 109 __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
110 return -EFAULT; 110 return -EFAULT;
@@ -116,7 +116,7 @@ sys_sigaction(int sig, const struct old_sigaction *act,
116 ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); 116 ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
117 117
118 if (!ret && oact) { 118 if (!ret && oact) {
119 if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) || 119 if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
120 __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || 120 __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
121 __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) 121 __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
122 return -EFAULT; 122 return -EFAULT;
@@ -236,7 +236,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
236 err |= __copy_from_user (regs->areg, sc->sc_areg, XCHAL_NUM_AREGS*4); 236 err |= __copy_from_user (regs->areg, sc->sc_areg, XCHAL_NUM_AREGS*4);
237 err |= __get_user(buf, &sc->sc_cpstate); 237 err |= __get_user(buf, &sc->sc_cpstate);
238 if (buf) { 238 if (buf) {
239 if (verify_area(VERIFY_READ, buf, sizeof(*buf))) 239 if (!access_ok(VERIFY_READ, buf, sizeof(*buf)))
240 goto badframe; 240 goto badframe;
241 err |= restore_cpextra(buf); 241 err |= restore_cpextra(buf);
242 } 242 }
@@ -357,7 +357,7 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
357 if (regs->depc > 64) 357 if (regs->depc > 64)
358 panic ("Double exception sys_sigreturn\n"); 358 panic ("Double exception sys_sigreturn\n");
359 359
360 if (verify_area(VERIFY_READ, frame, sizeof(*frame))) 360 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
361 goto badframe; 361 goto badframe;
362 362
363 if (__get_user(set.sig[0], &frame->sc.oldmask) 363 if (__get_user(set.sig[0], &frame->sc.oldmask)
@@ -394,7 +394,7 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
394 return 0; 394 return 0;
395 } 395 }
396 396
397 if (verify_area(VERIFY_READ, frame, sizeof(*frame))) 397 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
398 goto badframe; 398 goto badframe;
399 399
400 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) 400 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
@@ -433,7 +433,7 @@ badframe:
433static inline void * 433static inline void *
434get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size) 434get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
435{ 435{
436 if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! on_sig_stack(sp)) 436 if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp))
437 sp = current->sas_ss_sp + current->sas_ss_size; 437 sp = current->sas_ss_sp + current->sas_ss_size;
438 438
439 return (void *)((sp - frame_size) & -16ul); 439 return (void *)((sp - frame_size) & -16ul);