Changeset 772 for GPL/trunk/include/asm/uaccess.h
- Timestamp:
- Apr 19, 2025, 8:08:37 PM (4 months ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-6.6-LTS (added) merged: 765,768-769 /GPL/branches/uniaud32-exp (added) merged: 735-741,743-744,748-751,753-760,762-764 /GPL/branches/uniaud32-next merged: 718-734
- Property svn:mergeinfo changed
-
GPL/trunk/include/asm/uaccess.h
r679 r772 44 44 int is_access_ok(int type, void *addr, unsigned long size); 45 45 46 #define access_ok(type, addr, size) __access_ok((unsigned long)(addr),(size))47 48 46 /* 49 47 * The architecture should really override this if possible, at least 50 48 * doing a check on the get_fs() 51 49 */ 52 static inline int __access_ok(unsigned long addr, unsigned long size) 50 static inline int __access_ok(const void __user *ptr, unsigned long size) 51 53 52 { 54 53 return 1; 55 54 } 55 56 #define access_ok(addr, size) __access_ok(addr, size) 56 57 57 58 #define verify_area(type, addr, size) (access_ok(type, (void *)addr,size) ? 0 : -EFAULT) … … 235 236 #define strlen_user(str) strnlen_user(str, ~0UL >> 1) 236 237 long strnlen_user(const char *str, long n); 237 unsigned long clear_user(void *mem, unsigned long len); 238 unsigned long __clear_user(void *mem, unsigned long len); 238 /* 239 * Zero Userspace 240 */ 241 #ifndef __clear_user 242 static inline __must_check unsigned long 243 __clear_user(void __user *to, unsigned long n) 244 { 245 memset((void __force *)to, 0, n); 246 return 0; 247 } 248 #endif 249 250 static inline __must_check unsigned long 251 clear_user(void __user *to, unsigned long n) 252 { 253 if (!access_ok(to, n)) 254 return n; 255 256 return __clear_user(to, n); 257 } 239 258 240 259 #endif /* __i386_UACCESS_H */
Note:
See TracChangeset
for help on using the changeset viewer.