

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 <juhl-lkml@dif.dk>

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

 25-akpm/arch/um/include/um_uaccess.h    |    3 ++-
 25-akpm/include/asm-alpha/uaccess.h     |    3 ++-
 25-akpm/include/asm-arm/uaccess.h       |    3 ++-
 25-akpm/include/asm-arm26/uaccess.h     |    3 ++-
 25-akpm/include/asm-cris/uaccess.h      |    3 ++-
 25-akpm/include/asm-frv/uaccess.h       |    3 ++-
 25-akpm/include/asm-h8300/uaccess.h     |    3 ++-
 25-akpm/include/asm-i386/uaccess.h      |    5 +++--
 25-akpm/include/asm-ia64/uaccess.h      |    3 ++-
 25-akpm/include/asm-m32r/uaccess.h      |    5 +++--
 25-akpm/include/asm-m68k/uaccess.h      |    5 +++--
 25-akpm/include/asm-m68knommu/uaccess.h |    3 ++-
 25-akpm/include/asm-mips/uaccess.h      |    5 +++--
 25-akpm/include/asm-parisc/uaccess.h    |    4 +++-
 25-akpm/include/asm-ppc/uaccess.h       |    3 ++-
 25-akpm/include/asm-ppc64/uaccess.h     |    3 ++-
 25-akpm/include/asm-s390/uaccess.h      |    3 ++-
 25-akpm/include/asm-sh/uaccess.h        |    3 ++-
 25-akpm/include/asm-sh64/uaccess.h      |    3 ++-
 25-akpm/include/asm-sparc/uaccess.h     |    5 +++--
 25-akpm/include/asm-sparc64/uaccess.h   |    3 ++-
 25-akpm/include/asm-v850/uaccess.h      |    3 ++-
 25-akpm/include/asm-x86_64/uaccess.h    |    3 ++-
 23 files changed, 52 insertions(+), 28 deletions(-)

diff -puN arch/um/include/um_uaccess.h~verify_area-cleanup-deprecate arch/um/include/um_uaccess.h
--- 25/arch/um/include/um_uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/arch/um/include/um_uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -20,7 +20,8 @@
 #define access_ok(type, addr, size) \
 	CHOOSE_MODE_PROC(access_ok_tt, access_ok_skas, type, addr, size)
 
-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 (CHOOSE_MODE_PROC(verify_area_tt, verify_area_skas, type, addr,
 				size));
diff -puN include/asm-alpha/uaccess.h~verify_area-cleanup-deprecate include/asm-alpha/uaccess.h
--- 25/include/asm-alpha/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-alpha/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -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 -puN include/asm-arm26/uaccess.h~verify_area-cleanup-deprecate include/asm-arm26/uaccess.h
--- 25/include/asm-arm26/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-arm26/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -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 -puN include/asm-arm/uaccess.h~verify_area-cleanup-deprecate include/asm-arm/uaccess.h
--- 25/include/asm-arm/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-arm/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -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 -puN include/asm-cris/uaccess.h~verify_area-cleanup-deprecate include/asm-cris/uaccess.h
--- 25/include/asm-cris/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-cris/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -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 -puN include/asm-frv/uaccess.h~verify_area-cleanup-deprecate include/asm-frv/uaccess.h
--- 25/include/asm-frv/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-frv/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -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 -puN include/asm-h8300/uaccess.h~verify_area-cleanup-deprecate include/asm-h8300/uaccess.h
--- 25/include/asm-h8300/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-h8300/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -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 -puN include/asm-i386/uaccess.h~verify_area-cleanup-deprecate include/asm-i386/uaccess.h
--- 25/include/asm-i386/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-i386/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -84,7 +84,8 @@ extern struct movsl_mask {
 #define access_ok(type,addr,size) (likely(__range_ok(addr,size) == 0))
 
 /**
- * verify_area: - Obsolete, use access_ok()
+ * verify_area: - Obsolete/deprecated and will go away soon,
+ * use access_ok() instead.
  * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE
  * @addr: User space pointer to start of block to check
  * @size: Size of block to check
@@ -100,7 +101,7 @@ extern struct movsl_mask {
  *
  * See access_ok() for more details.
  */
-static inline int verify_area(int type, const void __user * addr, unsigned long size)
+static inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size)
 {
 	return access_ok(type,addr,size) ? 0 : -EFAULT;
 }
diff -puN include/asm-ia64/uaccess.h~verify_area-cleanup-deprecate include/asm-ia64/uaccess.h
--- 25/include/asm-ia64/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-ia64/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -69,7 +69,8 @@
 })
 #define access_ok(type, addr, size)	__access_ok((addr), (size), get_fs())
 
-static inline int
+/* 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 -puN include/asm-m32r/uaccess.h~verify_area-cleanup-deprecate include/asm-m32r/uaccess.h
--- 25/include/asm-m32r/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-m32r/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -121,7 +121,8 @@ static inline int access_ok(int type, co
 #endif /* CONFIG_MMU */
 
 /**
- * verify_area: - Obsolete, use access_ok()
+ * verify_area: - Obsolete/deprecated and will go away soon,
+ * use access_ok() instead.
  * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE
  * @addr: User space pointer to start of block to check
  * @size: Size of block to check
@@ -137,7 +138,7 @@ static inline int access_ok(int type, co
  *
  * See access_ok() for more details.
  */
-static inline int verify_area(int type, const void __user *addr,
+static inline int __deprecated verify_area(int type, const void __user *addr,
 			      unsigned long size)
 {
 	return access_ok(type, addr, size) ? 0 : -EFAULT;
diff -puN include/asm-m68knommu/uaccess.h~verify_area-cleanup-deprecate include/asm-m68knommu/uaccess.h
--- 25/include/asm-m68knommu/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-m68knommu/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -23,7 +23,8 @@ static inline int _access_ok(unsigned lo
 		(is_in_rom(addr) && is_in_rom(addr+size)));
 }
 
-extern inline int verify_area(int type, const void * addr, unsigned long size)
+/* this function will go away soon - use access_ok() instead */
+extern inline int __deprecated verify_area(int type, const void * addr, unsigned long size)
 {
 	return access_ok(type,addr,size)?0:-EFAULT;
 }
diff -puN include/asm-m68k/uaccess.h~verify_area-cleanup-deprecate include/asm-m68k/uaccess.h
--- 25/include/asm-m68k/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-m68k/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -14,9 +14,10 @@
 /* We let the MMU do all checking */
 #define access_ok(type,addr,size) 1
 
-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;
+	return access_ok(type,addr,size) ? 0 : -EFAULT;
 }
 
 /*
diff -puN include/asm-mips/uaccess.h~verify_area-cleanup-deprecate include/asm-mips/uaccess.h
--- 25/include/asm-mips/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-mips/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -112,7 +112,8 @@
 	likely(__access_ok((unsigned long)(addr), (size),__access_mask))
 
 /*
- * verify_area: - Obsolete, use access_ok()
+ * verify_area: - Obsolete/deprecated and will go away soon,
+ * use access_ok() instead.
  * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE
  * @addr: User space pointer to start of block to check
  * @size: Size of block to check
@@ -128,7 +129,7 @@
  *
  * See access_ok() for more details.
  */
-static inline int verify_area(int type, const void * addr, unsigned long size)
+static inline int __deprecated verify_area(int type, const void * addr, unsigned long size)
 {
 	return access_ok(type, addr, size) ? 0 : -EFAULT;
 }
diff -puN include/asm-parisc/uaccess.h~verify_area-cleanup-deprecate include/asm-parisc/uaccess.h
--- 25/include/asm-parisc/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-parisc/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -35,7 +35,9 @@ extern int __put_kernel_bad(void);
 extern int __put_user_bad(void);
 
 #define access_ok(type,addr,size)   (1)
-#define verify_area(type,addr,size) (0)
+#define verify_area(type,addr,size) (0)	/* FIXME: all users should go away soon,
+                                         * and use access_ok instead, then this
+                                         * should be removed. */
 
 #define put_user __put_user
 #define get_user __get_user
diff -puN include/asm-ppc64/uaccess.h~verify_area-cleanup-deprecate include/asm-ppc64/uaccess.h
--- 25/include/asm-ppc64/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-ppc64/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -56,7 +56,8 @@
 #define access_ok(type,addr,size) \
 	__access_ok(((__force unsigned long)(addr)),(size),get_fs())
 
-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 -puN include/asm-ppc/uaccess.h~verify_area-cleanup-deprecate include/asm-ppc/uaccess.h
--- 25/include/asm-ppc/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-ppc/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -37,7 +37,8 @@
 #define access_ok(type, addr, size) \
 	(__chk_user_ptr(addr),__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 -puN include/asm-s390/uaccess.h~verify_area-cleanup-deprecate include/asm-s390/uaccess.h
--- 25/include/asm-s390/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-s390/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -65,7 +65,8 @@
 
 #define access_ok(type,addr,size) __access_ok(addr,size)
 
-extern inline int verify_area(int type, const void __user *addr,
+/* 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 -puN include/asm-sh64/uaccess.h~verify_area-cleanup-deprecate include/asm-sh64/uaccess.h
--- 25/include/asm-sh64/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-sh64/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -60,7 +60,8 @@
 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0)
 #define __access_ok(addr,size) (__range_ok(addr,size) == 0)
 
-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 -puN include/asm-sh/uaccess.h~verify_area-cleanup-deprecate include/asm-sh/uaccess.h
--- 25/include/asm-sh/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-sh/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -146,7 +146,8 @@ static inline int access_ok(int type, co
 	return __access_ok(addr, size);
 }
 
-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 -puN include/asm-sparc64/uaccess.h~verify_area-cleanup-deprecate include/asm-sparc64/uaccess.h
--- 25/include/asm-sparc64/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-sparc64/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -54,7 +54,8 @@ do {										\
 #define __access_ok(addr,size) ((void)(addr), (void)(size), 1)
 #define access_ok(type,addr,size) ((void)(type), (void)(addr), (void)(size), 1)
 
-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 0;
 }
diff -puN include/asm-sparc/uaccess.h~verify_area-cleanup-deprecate include/asm-sparc/uaccess.h
--- 25/include/asm-sparc/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-sparc/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -46,9 +46,10 @@
 #define __access_ok(addr,size) (__user_ok((addr) & get_fs().seg,(size)))
 #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size))
 
-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;
+	return access_ok(type,addr,size) ? 0 : -EFAULT;
 }
 
 /*
diff -puN include/asm-v850/uaccess.h~verify_area-cleanup-deprecate include/asm-v850/uaccess.h
--- 25/include/asm-v850/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-v850/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -27,7 +27,8 @@ extern inline int access_ok (int type, c
 	return val >= (0x80 + NUM_CPU_IRQS*16) && val < 0xFFFFF000;
 }
 
-extern inline int verify_area (int type, const void *addr, unsigned long size)
+/* this function will go away soon - use access_ok() instead */
+extern inline int __deprecated verify_area (int type, const void *addr, unsigned long size)
 {
 	return access_ok (type, addr, size) ? 0 : -EFAULT;
 }
diff -puN include/asm-x86_64/uaccess.h~verify_area-cleanup-deprecate include/asm-x86_64/uaccess.h
--- 25/include/asm-x86_64/uaccess.h~verify_area-cleanup-deprecate	2005-03-03 22:09:52.000000000 -0800
+++ 25-akpm/include/asm-x86_64/uaccess.h	2005-03-03 22:09:52.000000000 -0800
@@ -49,7 +49,8 @@
 
 #define access_ok(type, addr, size) (__range_not_ok(addr,size) == 0)
 
-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;
 }
_
