The previous 9 patches should take care of converting all callers of
verify_area into access_ok, so now it's time to deprecate verify_area all
over so noone gets tempted to use it in new code - this patch does that.
Eventually when this has been deprecated for a while I'll send patches to
completely remove the function (thoughts on how long it should be
deprecated first are welcome).
Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
diff -urp linux-2.6.11-orig/include/asm-alpha/uaccess.h
linux-2.6.11/include/asm-alpha/uaccess.h
--- linux-2.6.11-orig/include/asm-alpha/uaccess.h 2005-03-02
08:38:17.0 +0100
+++ linux-2.6.11/include/asm-alpha/uaccess.h2005-03-03 23:58:56.0
+0100
@@ -48,7 +48,8 @@
__access_ok(((unsigned long)(addr)),(size),get_fs()); \
})
-extern inline int verify_area(int type, const void __user * addr, unsigned
long size)
+/* this function will go away soon - use access_ok() instead */
+extern inline int __deprecated verify_area(int type, const void __user * addr,
unsigned long size)
{
return access_ok(type,addr,size) ? 0 : -EFAULT;
}
diff -urp linux-2.6.11-orig/include/asm-arm/uaccess.h
linux-2.6.11/include/asm-arm/uaccess.h
--- linux-2.6.11-orig/include/asm-arm/uaccess.h 2005-03-02 08:38:12.0
+0100
+++ linux-2.6.11/include/asm-arm/uaccess.h 2005-03-03 23:58:56.0
+0100
@@ -77,7 +77,8 @@ static inline void set_fs (mm_segment_t
#define access_ok(type,addr,size) (__range_ok(addr,size) == 0)
-static inline int verify_area(int type, const void __user *addr, unsigned long
size)
+/* this function will go away soon - use access_ok() instead */
+static inline int __deprecated verify_area(int type, const void __user *addr,
unsigned long size)
{
return access_ok(type, addr, size) ? 0 : -EFAULT;
}
diff -urp linux-2.6.11-orig/include/asm-arm26/uaccess.h
linux-2.6.11/include/asm-arm26/uaccess.h
--- linux-2.6.11-orig/include/asm-arm26/uaccess.h 2005-03-02
08:37:48.0 +0100
+++ linux-2.6.11/include/asm-arm26/uaccess.h2005-03-03 23:58:57.0
+0100
@@ -40,7 +40,8 @@ extern int fixup_exception(struct pt_reg
#define access_ok(type,addr,size) (__range_ok(addr,size) == 0)
-static inline int verify_area(int type, const void * addr, unsigned long size)
+/* this function will go away soon - use access_ok() instead */
+static inline int __deprecated verify_area(int type, const void * addr,
unsigned long size)
{
return access_ok(type, addr, size) ? 0 : -EFAULT;
}
diff -urp linux-2.6.11-orig/include/asm-cris/uaccess.h
linux-2.6.11/include/asm-cris/uaccess.h
--- linux-2.6.11-orig/include/asm-cris/uaccess.h2005-03-02
08:37:48.0 +0100
+++ linux-2.6.11/include/asm-cris/uaccess.h 2005-03-03 23:58:57.0
+0100
@@ -91,7 +91,8 @@
#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 __user * addr, unsigned
long size)
+/* this function will go away soon - use access_ok() instead */
+extern inline int __deprecated verify_area(int type, const void __user * addr,
unsigned long size)
{
return access_ok(type,addr,size) ? 0 : -EFAULT;
}
diff -urp linux-2.6.11-orig/include/asm-frv/uaccess.h
linux-2.6.11/include/asm-frv/uaccess.h
--- linux-2.6.11-orig/include/asm-frv/uaccess.h 2005-03-02 08:38:33.0
+0100
+++ linux-2.6.11/include/asm-frv/uaccess.h 2005-03-03 23:58:57.0
+0100
@@ -67,7 +67,8 @@ static inline int ___range_ok(unsigned l
#define access_ok(type,addr,size) (__range_ok((addr), (size)) == 0)
#define __access_ok(addr,size) (__range_ok((addr), (size)) == 0)
-static inline int verify_area(int type, const void * addr, unsigned long size)
+/* this function will go away soon - use access_ok() / __range_ok() instead */
+static inline int __deprecated verify_area(int type, const void * addr,
unsigned long size)
{
return __range_ok(addr, size);
}
diff -urp linux-2.6.11-orig/include/asm-h8300/uaccess.h
linux-2.6.11/include/asm-h8300/uaccess.h
--- linux-2.6.11-orig/include/asm-h8300/uaccess.h 2005-03-02
08:37:54.0 +0100
+++ linux-2.6.11/include/asm-h8300/uaccess.h2005-03-03 23:58:57.0
+0100
@@ -24,7 +24,8 @@ static inline int __access_ok(unsigned l
return(RANGE_CHECK_OK(addr, size, 0L, (unsigned long)&_ramend));
}
-static inline int verify_area(int type, const void *addr, unsigned long size)
+/* this function will go away soon - use access_ok() instead */
+static inline int __deprecated verify_area(int type, const void *addr,
unsigned long size)
{
return access_ok(type,addr,size)?0:-EFAULT;
}
diff -urp linux-2.6.11-orig/include/asm-i386/uaccess.h
linux-2.6.11/include/asm-i386/uaccess.h
--- linux-2.6.11-orig/include/asm-i386/uaccess.h2005-03-02
08:37:49.0 +0100
+++ linux-2.6.11/include/asm-i386/