

The last remaining archs that have not already been converted from 
verify_area to access_ok by the previous patches are all taken care of by 
this one.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/alpha/kernel/osf_sys.c              |   13 ++++++-------
 25-akpm/arch/alpha/kernel/signal.c               |   12 ++++++------
 25-akpm/arch/arm/kernel/signal.c                 |    8 ++++----
 25-akpm/arch/arm26/kernel/signal.c               |    8 ++++----
 25-akpm/arch/cris/arch-v10/drivers/eeprom.c      |    2 +-
 25-akpm/arch/cris/arch-v10/drivers/gpio.c        |    2 +-
 25-akpm/arch/cris/arch-v10/kernel/signal.c       |    8 ++++----
 25-akpm/arch/frv/kernel/signal.c                 |    8 ++++----
 25-akpm/arch/h8300/kernel/signal.c               |    8 ++++----
 25-akpm/arch/m32r/kernel/signal.c                |    2 +-
 25-akpm/arch/m32r/kernel/sys_m32r.c              |    6 +++---
 25-akpm/arch/parisc/kernel/sys_parisc32.c        |    2 +-
 25-akpm/arch/s390/kernel/compat_signal.c         |    8 ++++----
 25-akpm/arch/s390/kernel/signal.c                |    8 ++++----
 25-akpm/arch/sh/kernel/signal.c                  |    8 ++++----
 25-akpm/arch/sh64/kernel/signal.c                |    8 ++++----
 25-akpm/arch/um/include/sysdep-i386/checksum.h   |    2 +-
 25-akpm/arch/um/include/sysdep-x86_64/checksum.h |    2 +-
 25-akpm/arch/um/sys-i386/ldt.c                   |    2 +-
 25-akpm/arch/um/sys-i386/signal.c                |    8 ++++----
 25-akpm/arch/um/sys-i386/syscalls.c              |    4 ++--
 25-akpm/arch/um/sys-x86_64/syscalls.c            |    4 ++--
 25-akpm/arch/v850/kernel/signal.c                |    8 ++++----
 25-akpm/arch/v850/kernel/syscalls.c              |    8 ++++----
 24 files changed, 74 insertions(+), 75 deletions(-)

diff -puN arch/alpha/kernel/osf_sys.c~verify_area-cleanup-misc-remaining-archs arch/alpha/kernel/osf_sys.c
--- 25/arch/alpha/kernel/osf_sys.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/alpha/kernel/osf_sys.c	2005-03-03 22:09:46.000000000 -0800
@@ -437,11 +437,10 @@ asmlinkage int
 osf_getdomainname(char __user *name, int namelen)
 {
 	unsigned len;
-	int i, error;
+	int i;
 
-	error = verify_area(VERIFY_WRITE, name, namelen);
-	if (error)
-		goto out;
+	if (!access_ok(VERIFY_WRITE, name, namelen))
+		return -EFAULT;
 
 	len = namelen;
 	if (namelen > 32)
@@ -454,8 +453,8 @@ osf_getdomainname(char __user *name, int
 			break;
 	}
 	up_read(&uts_sem);
- out:
-	return error;
+
+	return 0;
 }
 
 asmlinkage long
@@ -996,7 +995,7 @@ osf_select(int n, fd_set __user *inp, fd
 	if (tvp) {
 		time_t sec, usec;
 
-		if ((ret = verify_area(VERIFY_READ, tvp, sizeof(*tvp)))
+		if ((ret = access_ok(VERIFY_READ, tvp, sizeof(*tvp)) ? 0 : -EFAULT)
 		    || (ret = __get_user(sec, &tvp->tv_sec))
 		    || (ret = __get_user(usec, &tvp->tv_usec)))
 			goto out_nofds;
diff -puN arch/alpha/kernel/signal.c~verify_area-cleanup-misc-remaining-archs arch/alpha/kernel/signal.c
--- 25/arch/alpha/kernel/signal.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/alpha/kernel/signal.c	2005-03-03 22:09:46.000000000 -0800
@@ -91,7 +91,7 @@ osf_sigaction(int sig, const struct osf_
 
 	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_flags, &act->sa_flags))
 			return -EFAULT;
@@ -103,7 +103,7 @@ osf_sigaction(int sig, const struct osf_
 	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_flags, &oact->sa_flags))
 			return -EFAULT;
@@ -298,7 +298,7 @@ do_sigreturn(struct sigcontext __user *s
 	sigset_t set;
 
 	/* Verify that it's a good sigcontext before using it */
-	if (verify_area(VERIFY_READ, sc, sizeof(*sc)))
+	if (!access_ok(VERIFY_READ, sc, sizeof(*sc)))
 		goto give_sigsegv;
 	if (__get_user(set.sig[0], &sc->sc_mask))
 		goto give_sigsegv;
@@ -336,7 +336,7 @@ do_rt_sigreturn(struct rt_sigframe __use
 	sigset_t set;
 
 	/* Verify that it's a good ucontext_t before using it */
-	if (verify_area(VERIFY_READ, &frame->uc, sizeof(frame->uc)))
+	if (!access_ok(VERIFY_READ, &frame->uc, sizeof(frame->uc)))
 		goto give_sigsegv;
 	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
 		goto give_sigsegv;
@@ -446,7 +446,7 @@ setup_frame(int sig, struct k_sigaction 
 
 	oldsp = rdusp();
 	frame = get_sigframe(ka, oldsp, sizeof(*frame));
-	if (verify_area(VERIFY_WRITE, frame, sizeof(*frame)))
+	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
 		goto give_sigsegv;
 
 	err |= setup_sigcontext(&frame->sc, regs, sw, set->sig[0], oldsp);
@@ -497,7 +497,7 @@ setup_rt_frame(int sig, struct k_sigacti
 
 	oldsp = rdusp();
 	frame = get_sigframe(ka, oldsp, sizeof(*frame));
-	if (verify_area(VERIFY_WRITE, frame, sizeof(*frame)))
+	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
 		goto give_sigsegv;
 
 	err |= copy_siginfo_to_user(&frame->info, info);
diff -puN arch/arm26/kernel/signal.c~verify_area-cleanup-misc-remaining-archs arch/arm26/kernel/signal.c
--- 25/arch/arm26/kernel/signal.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/arm26/kernel/signal.c	2005-03-03 22:09:46.000000000 -0800
@@ -102,7 +102,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;
@@ -114,7 +114,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;
@@ -186,7 +186,7 @@ asmlinkage int sys_sigreturn(struct pt_r
 
 	frame = (struct sigframe *)regs->ARM_sp;
 
-	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)
 	    || (_NSIG_WORDS > 1
@@ -231,7 +231,7 @@ asmlinkage int sys_rt_sigreturn(struct p
 
 	frame = (struct rt_sigframe *)regs->ARM_sp;
 
-	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)))
 		goto badframe;
diff -puN arch/arm/kernel/signal.c~verify_area-cleanup-misc-remaining-archs arch/arm/kernel/signal.c
--- 25/arch/arm/kernel/signal.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/arm/kernel/signal.c	2005-03-03 22:09:46.000000000 -0800
@@ -102,7 +102,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;
@@ -114,7 +114,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;
@@ -317,7 +317,7 @@ asmlinkage int sys_sigreturn(struct pt_r
 
 	frame = (struct sigframe __user *)regs->ARM_sp;
 
-	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)
 	    || (_NSIG_WORDS > 1
@@ -365,7 +365,7 @@ asmlinkage int sys_rt_sigreturn(struct p
 
 	frame = (struct rt_sigframe __user *)regs->ARM_sp;
 
-	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)))
 		goto badframe;
diff -puN arch/cris/arch-v10/drivers/eeprom.c~verify_area-cleanup-misc-remaining-archs arch/cris/arch-v10/drivers/eeprom.c
--- 25/arch/cris/arch-v10/drivers/eeprom.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/cris/arch-v10/drivers/eeprom.c	2005-03-03 22:09:46.000000000 -0800
@@ -599,7 +599,7 @@ static ssize_t eeprom_write(struct file 
   int i, written, restart=1;
   unsigned long p;
 
-  if (verify_area(VERIFY_READ, buf, count))
+  if (!access_ok(VERIFY_READ, buf, count))
   {
     return -EFAULT;
   }
diff -puN arch/cris/arch-v10/drivers/gpio.c~verify_area-cleanup-misc-remaining-archs arch/cris/arch-v10/drivers/gpio.c
--- 25/arch/cris/arch-v10/drivers/gpio.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/cris/arch-v10/drivers/gpio.c	2005-03-03 22:09:46.000000000 -0800
@@ -355,7 +355,7 @@ static ssize_t gpio_write(struct file * 
 		return -EFAULT;
 	}
     
-	if (verify_area(VERIFY_READ, buf, count)) {
+	if (!access_ok(VERIFY_READ, buf, count)) {
 		return -EFAULT;
 	}
 	clk_mask = priv->clk_mask;
diff -puN arch/cris/arch-v10/kernel/signal.c~verify_area-cleanup-misc-remaining-archs arch/cris/arch-v10/kernel/signal.c
--- 25/arch/cris/arch-v10/kernel/signal.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/cris/arch-v10/kernel/signal.c	2005-03-03 22:09:46.000000000 -0800
@@ -125,7 +125,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;
@@ -137,7 +137,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;
@@ -231,7 +231,7 @@ asmlinkage int sys_sigreturn(long r10, l
         if (((long)frame) & 3)
                 goto badframe;
 
-	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)
 	    || (_NSIG_WORDS > 1
@@ -273,7 +273,7 @@ asmlinkage int sys_rt_sigreturn(long r10
         if (((long)frame) & 3)
                 goto badframe;
 
-	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)))
 		goto badframe;
diff -puN arch/frv/kernel/signal.c~verify_area-cleanup-misc-remaining-archs arch/frv/kernel/signal.c
--- 25/arch/frv/kernel/signal.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/frv/kernel/signal.c	2005-03-03 22:09:46.000000000 -0800
@@ -114,7 +114,7 @@ asmlinkage int sys_sigaction(int sig,
 
 	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;
@@ -126,7 +126,7 @@ asmlinkage int sys_sigaction(int sig,
 	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;
@@ -197,7 +197,7 @@ asmlinkage int sys_sigreturn(void)
 	sigset_t set;
 	int gr8;
 
-	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.sc_oldmask))
 		goto badframe;
@@ -228,7 +228,7 @@ asmlinkage int sys_rt_sigreturn(void)
 	stack_t st;
 	int gr8;
 
-	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)))
 		goto badframe;
diff -puN arch/h8300/kernel/signal.c~verify_area-cleanup-misc-remaining-archs arch/h8300/kernel/signal.c
--- 25/arch/h8300/kernel/signal.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/h8300/kernel/signal.c	2005-03-03 22:09:46.000000000 -0800
@@ -113,7 +113,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;
@@ -125,7 +125,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;
@@ -222,7 +222,7 @@ asmlinkage int do_sigreturn(unsigned lon
 	sigset_t set;
 	int er0;
 
-	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.sc_mask) ||
 	    (_NSIG_WORDS > 1 &&
@@ -253,7 +253,7 @@ asmlinkage int do_rt_sigreturn(unsigned 
 	sigset_t set;
 	int er0;
 
-	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)))
 		goto badframe;
diff -puN arch/m32r/kernel/signal.c~verify_area-cleanup-misc-remaining-archs arch/m32r/kernel/signal.c
--- 25/arch/m32r/kernel/signal.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/m32r/kernel/signal.c	2005-03-03 22:09:46.000000000 -0800
@@ -147,7 +147,7 @@ sys_rt_sigreturn(unsigned long r0, unsig
 	stack_t st;
 	int result;
 
-	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)))
 		goto badframe;
diff -puN arch/m32r/kernel/sys_m32r.c~verify_area-cleanup-misc-remaining-archs arch/m32r/kernel/sys_m32r.c
--- 25/arch/m32r/kernel/sys_m32r.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/m32r/kernel/sys_m32r.c	2005-03-03 22:09:46.000000000 -0800
@@ -171,9 +171,9 @@ asmlinkage int sys_ipc(uint call, int fi
 	case SHMAT: {
 		ulong raddr;
 
-		if ((ret = verify_area(VERIFY_WRITE, (ulong __user *) third,
-				      sizeof(ulong))))
-			return ret;
+		if (!access_ok(VERIFY_WRITE, (ulong __user *) third,
+				      sizeof(ulong)))
+			return -EFAULT;
 		ret = do_shmat (first, (char __user *) ptr, second, &raddr);
 		if (ret)
 			return ret;
diff -puN arch/parisc/kernel/sys_parisc32.c~verify_area-cleanup-misc-remaining-archs arch/parisc/kernel/sys_parisc32.c
--- 25/arch/parisc/kernel/sys_parisc32.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/parisc/kernel/sys_parisc32.c	2005-03-03 22:09:46.000000000 -0800
@@ -422,7 +422,7 @@ get_fd_set32(unsigned long n, u32 *ufdse
 	if (ufdset) {
 		unsigned long odd;
 
-		if (verify_area(VERIFY_WRITE, ufdset, n*sizeof(u32)))
+		if (!access_ok(VERIFY_WRITE, ufdset, n*sizeof(u32)))
 			return -EFAULT;
 
 		odd = n & 1UL;
diff -puN arch/s390/kernel/compat_signal.c~verify_area-cleanup-misc-remaining-archs arch/s390/kernel/compat_signal.c
--- 25/arch/s390/kernel/compat_signal.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/s390/kernel/compat_signal.c	2005-03-03 22:09:46.000000000 -0800
@@ -231,7 +231,7 @@ sys32_sigaction(int sig, const struct ol
 
         if (act) {
 		compat_old_sigset_t mask;
-		if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
+		if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
 		    __get_user(sa_handler, &act->sa_handler) ||
 		    __get_user(sa_restorer, &act->sa_restorer))
 			return -EFAULT;
@@ -247,7 +247,7 @@ sys32_sigaction(int sig, const struct ol
 	if (!ret && oact) {
 		sa_handler = (unsigned long) old_ka.sa.sa_handler;
 		sa_restorer = (unsigned long) old_ka.sa.sa_restorer;
-		if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
+		if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
 		    __put_user(sa_handler, &oact->sa_handler) ||
 		    __put_user(sa_restorer, &oact->sa_restorer))
 			return -EFAULT;
@@ -416,7 +416,7 @@ asmlinkage long sys32_sigreturn(struct p
 	sigframe32 __user *frame = (sigframe32 __user *)regs->gprs[15];
 	sigset_t set;
 
-	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
+	if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
 		goto badframe;
 	if (__copy_from_user(&set.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE32))
 		goto badframe;
@@ -446,7 +446,7 @@ asmlinkage long sys32_rt_sigreturn(struc
 	int err;
 	mm_segment_t old_fs = get_fs();
 
-	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)))
 		goto badframe;
diff -puN arch/s390/kernel/signal.c~verify_area-cleanup-misc-remaining-archs arch/s390/kernel/signal.c
--- 25/arch/s390/kernel/signal.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/s390/kernel/signal.c	2005-03-03 22:09:46.000000000 -0800
@@ -116,7 +116,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;
@@ -128,7 +128,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;
@@ -214,7 +214,7 @@ asmlinkage long sys_sigreturn(struct pt_
 	sigframe __user *frame = (sigframe __user *)regs->gprs[15];
 	sigset_t set;
 
-	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
+	if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
 		goto badframe;
 	if (__copy_from_user(&set.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE))
 		goto badframe;
@@ -240,7 +240,7 @@ asmlinkage long sys_rt_sigreturn(struct 
 	rt_sigframe __user *frame = (rt_sigframe __user *)regs->gprs[15];
 	sigset_t set;
 
-	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
+	if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
 		goto badframe;
 	if (__copy_from_user(&set.sig, &frame->uc.uc_sigmask, sizeof(set)))
 		goto badframe;
diff -puN arch/sh64/kernel/signal.c~verify_area-cleanup-misc-remaining-archs arch/sh64/kernel/signal.c
--- 25/arch/sh64/kernel/signal.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/sh64/kernel/signal.c	2005-03-03 22:09:46.000000000 -0800
@@ -125,7 +125,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;
@@ -137,7 +137,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;
@@ -293,7 +293,7 @@ asmlinkage int sys_sigreturn(unsigned lo
 	sigset_t set;
 	long long ret;
 
-	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)
@@ -330,7 +330,7 @@ asmlinkage int sys_rt_sigreturn(unsigned
 	stack_t __user st;
 	long long ret;
 
-	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)))
diff -puN arch/sh/kernel/signal.c~verify_area-cleanup-misc-remaining-archs arch/sh/kernel/signal.c
--- 25/arch/sh/kernel/signal.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/sh/kernel/signal.c	2005-03-03 22:09:46.000000000 -0800
@@ -100,7 +100,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;
@@ -112,7 +112,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;
@@ -239,7 +239,7 @@ asmlinkage int sys_sigreturn(unsigned lo
 	sigset_t set;
 	int r0;
 
-	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)
@@ -273,7 +273,7 @@ asmlinkage int sys_rt_sigreturn(unsigned
 	stack_t st;
 	int r0;
 
-	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)))
diff -puN arch/um/include/sysdep-i386/checksum.h~verify_area-cleanup-misc-remaining-archs arch/um/include/sysdep-i386/checksum.h
--- 25/arch/um/include/sysdep-i386/checksum.h~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/um/include/sysdep-i386/checksum.h	2005-03-03 22:09:46.000000000 -0800
@@ -41,7 +41,7 @@ unsigned int csum_partial_copy_from(cons
  *	passed in an incorrect kernel address to one of these functions.
  *
  *	If you use these functions directly please don't forget the
- *	verify_area().
+ *	access_ok().
  */
 
 static __inline__
diff -puN arch/um/include/sysdep-x86_64/checksum.h~verify_area-cleanup-misc-remaining-archs arch/um/include/sysdep-x86_64/checksum.h
--- 25/arch/um/include/sysdep-x86_64/checksum.h~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/um/include/sysdep-x86_64/checksum.h	2005-03-03 22:09:46.000000000 -0800
@@ -19,7 +19,7 @@ extern unsigned csum_partial(const unsig
  *	passed in an incorrect kernel address to one of these functions.
  *
  *	If you use these functions directly please don't forget the
- *	verify_area().
+ *	access_ok().
  */
 
 static __inline__
diff -puN arch/um/sys-i386/ldt.c~verify_area-cleanup-misc-remaining-archs arch/um/sys-i386/ldt.c
--- 25/arch/um/sys-i386/ldt.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/um/sys-i386/ldt.c	2005-03-03 22:09:46.000000000 -0800
@@ -17,7 +17,7 @@ extern int modify_ldt(int func, void *pt
 
 int sys_modify_ldt_tt(int func, void __user *ptr, unsigned long bytecount)
 {
-	if (verify_area(VERIFY_READ, ptr, bytecount))
+	if (!access_ok(VERIFY_READ, ptr, bytecount))
 		return -EFAULT;
 
 	return modify_ldt(func, ptr, bytecount);
diff -puN arch/um/sys-i386/signal.c~verify_area-cleanup-misc-remaining-archs arch/um/sys-i386/signal.c
--- 25/arch/um/sys-i386/signal.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/um/sys-i386/signal.c	2005-03-03 22:09:46.000000000 -0800
@@ -211,8 +211,8 @@ int setup_signal_stack_sc(unsigned long 
 
 	stack_top &= -8UL;
 	frame = (struct sigframe *) stack_top - 1;
-	if(verify_area(VERIFY_WRITE, frame, sizeof(*frame)))
-		return(1);
+	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
+		return 1;
 
 	restorer = (void *) frame->retcode;
 	if(ka->sa.sa_flags & SA_RESTORER)
@@ -261,8 +261,8 @@ int setup_signal_stack_si(unsigned long 
 
 	stack_top &= -8UL;
 	frame = (struct rt_sigframe *) stack_top - 1;
-	if(verify_area(VERIFY_WRITE, frame, sizeof(*frame)))
-		return(1);
+	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
+		return 1;
 
 	restorer = (void *) frame->retcode;
 	if(ka->sa.sa_flags & SA_RESTORER)
diff -puN arch/um/sys-i386/syscalls.c~verify_area-cleanup-misc-remaining-archs arch/um/sys-i386/syscalls.c
--- 25/arch/um/sys-i386/syscalls.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/um/sys-i386/syscalls.c	2005-03-03 22:09:46.000000000 -0800
@@ -175,7 +175,7 @@ long sys_sigaction(int sig, const struct
 
 	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;
@@ -187,7 +187,7 @@ long sys_sigaction(int sig, const struct
 	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;
diff -puN arch/um/sys-x86_64/syscalls.c~verify_area-cleanup-misc-remaining-archs arch/um/sys-x86_64/syscalls.c
--- 25/arch/um/sys-x86_64/syscalls.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/um/sys-x86_64/syscalls.c	2005-03-03 22:09:46.000000000 -0800
@@ -29,8 +29,8 @@ long sys_modify_ldt_tt(int func, void *p
 	/* XXX This should check VERIFY_WRITE depending on func, check this
 	 * in i386 as well.
 	 */
-	if(verify_area(VERIFY_READ, ptr, bytecount))
-		return(-EFAULT);
+	if (!access_ok(VERIFY_READ, ptr, bytecount))
+		return -EFAULT;
 	return(modify_ldt(func, ptr, bytecount));
 }
 #endif
diff -puN arch/v850/kernel/signal.c~verify_area-cleanup-misc-remaining-archs arch/v850/kernel/signal.c
--- 25/arch/v850/kernel/signal.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/v850/kernel/signal.c	2005-03-03 22:09:46.000000000 -0800
@@ -102,7 +102,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;
@@ -114,7 +114,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;
@@ -178,7 +178,7 @@ asmlinkage int sys_sigreturn(struct pt_r
 	sigset_t set;
 	int rval;
 
-	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)
@@ -209,7 +209,7 @@ asmlinkage int sys_rt_sigreturn(struct p
 	stack_t st;
 	int rval;
 
-	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)))
diff -puN arch/v850/kernel/syscalls.c~verify_area-cleanup-misc-remaining-archs arch/v850/kernel/syscalls.c
--- 25/arch/v850/kernel/syscalls.c~verify_area-cleanup-misc-remaining-archs	2005-03-03 22:09:46.000000000 -0800
+++ 25-akpm/arch/v850/kernel/syscalls.c	2005-03-03 22:09:46.000000000 -0800
@@ -62,7 +62,7 @@ sys_ipc (uint call, int first, int secon
 
 		if (!ptr)
 			break;
-		if ((ret = verify_area (VERIFY_READ, ptr, sizeof(long)))
+		if ((ret = access_ok(VERIFY_READ, ptr, sizeof(long)) ? 0 : -EFAULT)
 		    || (ret = get_user(fourth.__pad, (void **)ptr)))
 			break;
 		ret = sys_semctl (first, second, third, fourth);
@@ -78,7 +78,7 @@ sys_ipc (uint call, int first, int secon
 
 			if (!ptr)
 				break;
-			if ((ret = verify_area (VERIFY_READ, ptr, sizeof(tmp)))
+			if ((ret = access_ok(VERIFY_READ, ptr, sizeof(tmp)) ? 0 : -EFAULT)
 			    || (ret = copy_from_user(&tmp,
 						(struct ipc_kludge *) ptr,
 						sizeof (tmp))))
@@ -104,8 +104,8 @@ sys_ipc (uint call, int first, int secon
 		default: {
 			ulong raddr;
 
-			if ((ret = verify_area(VERIFY_WRITE, (ulong*) third,
-					       sizeof(ulong))))
+			if ((ret = access_ok(VERIFY_WRITE, (ulong*) third,
+					       sizeof(ulong)) ? 0 : -EFAULT))
 				break;
 			ret = do_shmat (first, (char *) ptr, second, &raddr);
 			if (ret)
_
