diff -urN RC13-git5-m68k-iomem/include/asm-m68k/uaccess.h RC13-git5-m68k-user/include/asm-m68k/uaccess.h --- RC13-git5-m68k-iomem/include/asm-m68k/uaccess.h 2005-06-17 15:48:29.000000000 -0400 +++ RC13-git5-m68k-user/include/asm-m68k/uaccess.h 2005-09-05 16:40:44.000000000 -0400 @@ -15,7 +15,7 @@ #define access_ok(type,addr,size) 1 /* this function will go away soon - use access_ok() instead */ -static inline int __deprecated verify_area(int type, const void *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; } @@ -48,6 +48,7 @@ ({ \ int __pu_err; \ typeof(*(ptr)) __pu_val = (x); \ + __chk_user_ptr(ptr); \ switch (sizeof (*(ptr))) { \ case 1: \ __put_user_asm(__pu_err, __pu_val, ptr, b); \ @@ -97,6 +98,7 @@ ({ \ int __gu_err; \ typeof(*(ptr)) __gu_val; \ + __chk_user_ptr(ptr); \ switch (sizeof(*(ptr))) { \ case 1: \ __get_user_asm(__gu_err, __gu_val, ptr, b, "=d"); \ @@ -140,7 +142,7 @@ : "m"(*(ptr)), "i" (-EFAULT), "0"(0)) static inline unsigned long -__generic_copy_from_user(void *to, const void *from, unsigned long n) +__generic_copy_from_user(void *to, const void __user *from, unsigned long n) { unsigned long tmp; __asm__ __volatile__ @@ -195,7 +197,7 @@ } static inline unsigned long -__generic_copy_to_user(void *to, const void *from, unsigned long n) +__generic_copy_to_user(void __user *to, const void *from, unsigned long n) { unsigned long tmp; __asm__ __volatile__ @@ -270,7 +272,7 @@ : "d0", "memory") static inline unsigned long -__constant_copy_from_user(void *to, const void *from, unsigned long n) +__constant_copy_from_user(void *to, const void __user *from, unsigned long n) { switch (n) { case 0: @@ -526,7 +528,7 @@ #define __copy_from_user_inatomic __copy_from_user static inline unsigned long -__constant_copy_to_user(void *to, const void *from, unsigned long n) +__constant_copy_to_user(void __user *to, const void *from, unsigned long n) { switch (n) { case 0: @@ -772,7 +774,7 @@ */ static inline long -strncpy_from_user(char *dst, const char *src, long count) +strncpy_from_user(char *dst, const char __user *src, long count) { long res; if (count == 0) return count; @@ -805,7 +807,7 @@ * * Return 0 on exception, a value greater than N if too long */ -static inline long strnlen_user(const char *src, long n) +static inline long strnlen_user(const char __user *src, long n) { long res; @@ -848,7 +850,7 @@ */ static inline unsigned long -clear_user(void *to, unsigned long n) +clear_user(void __user *to, unsigned long n) { __asm__ __volatile__ (" tstl %1\n"