Re: [PATCH][10/10] verify_area cleanup : deprecate

2005-03-04 Thread Jesper Juhl
On Thu, 3 Mar 2005, Roland Dreier wrote:

> Jesper> Eventually when this has been deprecated for a while I'll
> Jesper> send patches to completely remove the function (thoughts
> Jesper> on how long it should be deprecated first are welcome).
> 
> I don't have an opinion on how long to wait before removing the
> function, but this patch should probably add an entry to
> Documentation/feature-removal.txt.
> 
Something like this should do I assume. I'll add that to the deprecation 
patch in the future.


Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>

--- linux-2.6.11-orig/Documentation/feature-removal-schedule.txt
2005-03-02 08:38:13.0 +0100
+++ linux-2.6.11/Documentation/feature-removal-schedule.txt 2005-03-04 
11:19:48.0 +0100
@@ -15,3 +15,9 @@
against the LSB, and can be replaced by using udev.
 Who:   Greg Kroah-Hartman <[EMAIL PROTECTED]>
 
+What:  verify_area
+When:  May 2005
+Files: include/asm-*/uaccess.h
+Why:   Obsolete, replaced by (and simply a wrapper for) access_ok.
+Who:   Jesper Juhl <[EMAIL PROTECTED]>
+



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH][10/10] verify_area cleanup : deprecate

2005-03-03 Thread Roland Dreier
Jesper> Eventually when this has been deprecated for a while I'll
Jesper> send patches to completely remove the function (thoughts
Jesper> on how long it should be deprecated first are welcome).

I don't have an opinion on how long to wait before removing the
function, but this patch should probably add an entry to
Documentation/feature-removal.txt.

 - R.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH][10/10] verify_area cleanup : deprecate

2005-03-03 Thread Jesper Juhl

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/