Re: We also need to get rid of verify_area in entry.S

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 8/29/05, Jesper Juhl <[email protected]> wrote:
On Monday 29 August 2005 20:21, Chris Zankel wrote:
> Jesper,
> Thanks for the patches. I'll take a look at the entry.S one and will
> pass it along to Andres, and will incorporate the signal.c patch.
Hi Chris,

Following up on an old mail...

verify_area() is still alive on xtensa in 2.6.17-rc3-git13 :-(
Do you have any plans to get rid of it? Are the original patches I
send still useful? Should I create new patches?
It would be nice to finally be rid of that function across the board.
Xtensa is the only user left and verify_area() comletely relaces it,
so let's get rid of the cruft - no?


Thank you.

I was originally planning to submit a single patch that removes
verify_area across the board, but I guess it might be easier if I just
hand you the bit of the patch that handles xtensa (instead of waiting for
those bits to hit -mm) and then submit the rest along with a note that
similar patches for xtensa will arrive later via you.

So, here's the final bit that removes verify_area completely from xtensa :

Signed-off-by: Jesper Juhl <[email protected]>

diff -upr -X ./linux-2.6.13/Documentation/dontdiff linux-2.6.13-orig/include/asm-xtensa/checksum.h linux-2.6.13/include/asm-xtensa/checksum.h
--- linux-2.6.13-orig/include/asm-xtensa/checksum.h     2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.13/include/asm-xtensa/checksum.h  2005-08-29 03:46:34.000000000 +0200
@@ -45,7 +45,7 @@ asmlinkage unsigned int csum_partial_cop
  *     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().
 extern __inline__
 unsigned int csum_partial_copy_nocheck ( const char *src, char *dst,
diff -upr -X ./linux-2.6.13/Documentation/dontdiff linux-2.6.13-orig/include/asm-xtensa/uaccess.h linux-2.6.13/include/asm-xtensa/uaccess.h
--- linux-2.6.13-orig/include/asm-xtensa/uaccess.h      2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.13/include/asm-xtensa/uaccess.h   2005-08-29 03:47:18.000000000 +0200
@@ -154,35 +154,6 @@

- * verify_area determines whether a memory access is allowed.  It's
- * mostly an unnecessary wrapper for access_ok, but we provide it as a
- * duplicate of the verify_area() C inline function below.  See the
- * equivalent C version below for clarity.
- *
- * On error, verify_area branches to a label indicated by parameter
- * <error>.  This implies that the macro falls through to the next
- * instruction on success.
- *
- * Note that we assume success is the common case, and we optimize the
- * branch fall-through case on success.
- *
- * On Entry:
- *     <aa>    register containing memory address
- *     <as>    register containing memory size
- *     <at>    temp register
- *     <error> label to branch to on error; implies fall-through
- *             macro on success
- * On Exit:
- *     <aa>    preserved
- *     <as>    preserved
- *     <at>    destroyed
- */
-       .macro  verify_area     aa, as, at, sp, error
-       access_ok  \at, \aa, \as, \sp, \error
-       .endm
 #else /* __ASSEMBLY__ not defined */

 #include <linux/sched.h>
@@ -211,11 +182,6 @@
 #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size)))
 #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size))

-extern inline int verify_area(int type, const void * addr, unsigned long size)
-       return access_ok(type,addr,size) ? 0 : -EFAULT;
  * These are the main single-value transfer routines.  They
  * automatically use the right size if we just have the right pointer

Jesper Juhl <[email protected]>
Don't top-post
Plain text mails only, please
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at
Please read the FAQ at

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux