From: Jesper Juhl <jesper.juhl@gmail.com>
To: Chris Zankel <chris@zankel.net>
Cc: "linux-kernel" <linux-kernel@vger.kernel.org>
Subject: [PATCH] convert verify_area to access_ok in xtensa/kernel/signal.c
Date: Mon, 29 Aug 2005 19:31:00 +0200 [thread overview]
Message-ID: <200508291931.00764.jesper.juhl@gmail.com> (raw)
verify_area() is deprecated and has been for quite a while.
I thought I had cleaned up all users and was planning to submit the final
patches to get rid of it completely, but when I did a final check I found
that xtensa has been added after my initial cleanup and it still uses
verify_area(), so we have to get that cleaned up before I can get on with
the final verify_area removal.
This patch converts all uses of verify_area() in xtensa/kernel/signal.c to
use access_ok() instead.
Please apply.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
diff -upr -X ./linux-2.6.13/Documentation/dontdiff linux-2.6.13-orig/arch/xtensa/kernel/signal.c linux-2.6.13/arch/xtensa/kernel/signal.c
--- linux-2.6.13-orig/arch/xtensa/kernel/signal.c 2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.13/arch/xtensa/kernel/signal.c 2005-08-29 03:40:12.000000000 +0200
@@ -104,7 +104,7 @@ sys_sigaction(int sig, const struct old_
if (act) {
old_sigset_t mask;
- if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
+ if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
__get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
__get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
return -EFAULT;
@@ -116,7 +116,7 @@ sys_sigaction(int sig, const struct old_
ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
if (!ret && oact) {
- if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
+ if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
__put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
__put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
return -EFAULT;
@@ -236,7 +236,7 @@ restore_sigcontext(struct pt_regs *regs,
err |= __copy_from_user (regs->areg, sc->sc_areg, XCHAL_NUM_AREGS*4);
err |= __get_user(buf, &sc->sc_cpstate);
if (buf) {
- if (verify_area(VERIFY_READ, buf, sizeof(*buf)))
+ if (!access_ok(VERIFY_READ, buf, sizeof(*buf)))
goto badframe;
err |= restore_cpextra(buf);
}
@@ -357,7 +357,7 @@ asmlinkage int sys_sigreturn(struct pt_r
if (regs->depc > 64)
panic ("Double exception sys_sigreturn\n");
- if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
+ if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
goto badframe;
if (__get_user(set.sig[0], &frame->sc.oldmask)
@@ -394,7 +394,7 @@ asmlinkage int sys_rt_sigreturn(struct p
return 0;
}
- if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
+ if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
goto badframe;
if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
next reply other threads:[~2005-08-29 17:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-29 17:31 Jesper Juhl [this message]
2005-08-29 17:39 ` [PATCH] convert verify_area to access_ok in xtensa/kernel/signal.c linux-os (Dick Johnson)
2005-08-29 17:45 ` Jesper Juhl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200508291931.00764.jesper.juhl@gmail.com \
--to=jesper.juhl@gmail.com \
--cc=chris@zankel.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox