Changeset 763 for GPL/branches/uniaud32-exp/include/asm/uaccess.h
- Timestamp:
- Apr 6, 2025, 3:30:42 AM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-exp/include/asm/uaccess.h
r639 r763 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 … … 54 52 return 1; 55 53 } 54 55 #define access_ok(addr, size) __access_ok(addr, size) 56 56 57 57 #define verify_area(type, addr, size) (access_ok(type, (void *)addr,size) ? 0 : -EFAULT) … … 235 235 #define strlen_user(str) strnlen_user(str, ~0UL >> 1) 236 236 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); 237 /* 238 * Zero Userspace 239 */ 240 #ifndef __clear_user 241 static inline __must_check unsigned long 242 __clear_user(void __user *to, unsigned long n) 243 { 244 memset((void __force *)to, 0, n); 245 return 0; 246 } 247 #endif 248 249 static inline __must_check unsigned long 250 clear_user(void __user *to, unsigned long n) 251 { 252 if (!access_ok(to, n)) 253 return n; 254 255 return __clear_user(to, n); 256 } 239 257 240 258 #endif /* __i386_UACCESS_H */
Note:
See TracChangeset
for help on using the changeset viewer.