/external/linux-tools-perf/src/tools/perf/util/include/asm/ |
uaccess.h | 12 #define access_ok(type, addr, size) 1 macro
|
/development/ndk/platforms/android-3/header-patches/include/asm/ |
uaccess.h | 29 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) macro
|
/development/ndk/platforms/android-9/arch-mips/include/asm/ |
uaccess.h | 47 #define access_ok(type, addr, size) likely(__access_ok((unsigned long)(addr), (size), __access_mask)) macro 60 #define __get_user_check(x, ptr, size) ({ long __gu_err = -EFAULT; const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) __get_user_common((x), size, __gu_ptr); __gu_err; }) 66 #define __put_user_check(x, ptr, size) ({ __typeof__(*(ptr)) __user *__pu_addr = (ptr); __typeof__(*(ptr)) __pu_val = (x); long __pu_err = -EFAULT; if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) { switch (size) { case 1: __put_user_asm("sb", __pu_addr); break; case 2: __put_user_asm("sh", __pu_addr); break; case 4: __put_user_asm("sw", __pu_addr); break; case 8: __PUT_USER_DW(__pu_addr); break; default: __put_user_unknown(); break; } } __pu_err; }) 82 #define copy_to_user(to, from, n) ({ void __user *__cu_to; const void *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 87 #define copy_from_user(to, from, n) ({ void *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_READ, __cu_from, __cu_len)) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 90 #define copy_in_user(to, from, n) ({ void __user *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && access_ok(VERIFY_WRITE, __cu_to, __cu_len))) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 91 #define clear_user(addr,n) ({ void __user * __cl_addr = (addr); unsigned long __cl_size = (n); if (__cl_size && access_ok(VERIFY_WRITE, ((unsigned long)(__cl_addr)), __cl_size)) __cl_size = __clear_user(__cl_addr, __cl_size); __cl_size; })
|
/prebuilts/ndk/8/platforms/android-14/arch-mips/usr/include/asm/ |
uaccess.h | 47 #define access_ok(type, addr, size) likely(__access_ok((unsigned long)(addr), (size), __access_mask)) macro 60 #define __get_user_check(x, ptr, size) ({ long __gu_err = -EFAULT; const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) __get_user_common((x), size, __gu_ptr); __gu_err; }) 66 #define __put_user_check(x, ptr, size) ({ __typeof__(*(ptr)) __user *__pu_addr = (ptr); __typeof__(*(ptr)) __pu_val = (x); long __pu_err = -EFAULT; if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) { switch (size) { case 1: __put_user_asm("sb", __pu_addr); break; case 2: __put_user_asm("sh", __pu_addr); break; case 4: __put_user_asm("sw", __pu_addr); break; case 8: __PUT_USER_DW(__pu_addr); break; default: __put_user_unknown(); break; } } __pu_err; }) 82 #define copy_to_user(to, from, n) ({ void __user *__cu_to; const void *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 87 #define copy_from_user(to, from, n) ({ void *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_READ, __cu_from, __cu_len)) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 90 #define copy_in_user(to, from, n) ({ void __user *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && access_ok(VERIFY_WRITE, __cu_to, __cu_len))) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 91 #define clear_user(addr,n) ({ void __user * __cl_addr = (addr); unsigned long __cl_size = (n); if (__cl_size && access_ok(VERIFY_WRITE, ((unsigned long)(__cl_addr)), __cl_size)) __cl_size = __clear_user(__cl_addr, __cl_size); __cl_size; })
|
/prebuilts/ndk/8/platforms/android-9/arch-mips/usr/include/asm/ |
uaccess.h | 47 #define access_ok(type, addr, size) likely(__access_ok((unsigned long)(addr), (size), __access_mask)) macro 60 #define __get_user_check(x, ptr, size) ({ long __gu_err = -EFAULT; const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) __get_user_common((x), size, __gu_ptr); __gu_err; }) 66 #define __put_user_check(x, ptr, size) ({ __typeof__(*(ptr)) __user *__pu_addr = (ptr); __typeof__(*(ptr)) __pu_val = (x); long __pu_err = -EFAULT; if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) { switch (size) { case 1: __put_user_asm("sb", __pu_addr); break; case 2: __put_user_asm("sh", __pu_addr); break; case 4: __put_user_asm("sw", __pu_addr); break; case 8: __PUT_USER_DW(__pu_addr); break; default: __put_user_unknown(); break; } } __pu_err; }) 82 #define copy_to_user(to, from, n) ({ void __user *__cu_to; const void *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 87 #define copy_from_user(to, from, n) ({ void *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_READ, __cu_from, __cu_len)) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 90 #define copy_in_user(to, from, n) ({ void __user *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && access_ok(VERIFY_WRITE, __cu_to, __cu_len))) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 91 #define clear_user(addr,n) ({ void __user * __cl_addr = (addr); unsigned long __cl_size = (n); if (__cl_size && access_ok(VERIFY_WRITE, ((unsigned long)(__cl_addr)), __cl_size)) __cl_size = __clear_user(__cl_addr, __cl_size); __cl_size; })
|
/prebuilts/ndk/9/platforms/android-12/arch-mips/usr/include/asm/ |
uaccess.h | 47 #define access_ok(type, addr, size) likely(__access_ok((unsigned long)(addr), (size), __access_mask)) macro 60 #define __get_user_check(x, ptr, size) ({ long __gu_err = -EFAULT; const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) __get_user_common((x), size, __gu_ptr); __gu_err; }) 66 #define __put_user_check(x, ptr, size) ({ __typeof__(*(ptr)) __user *__pu_addr = (ptr); __typeof__(*(ptr)) __pu_val = (x); long __pu_err = -EFAULT; if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) { switch (size) { case 1: __put_user_asm("sb", __pu_addr); break; case 2: __put_user_asm("sh", __pu_addr); break; case 4: __put_user_asm("sw", __pu_addr); break; case 8: __PUT_USER_DW(__pu_addr); break; default: __put_user_unknown(); break; } } __pu_err; }) 82 #define copy_to_user(to, from, n) ({ void __user *__cu_to; const void *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 87 #define copy_from_user(to, from, n) ({ void *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_READ, __cu_from, __cu_len)) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 90 #define copy_in_user(to, from, n) ({ void __user *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && access_ok(VERIFY_WRITE, __cu_to, __cu_len))) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 91 #define clear_user(addr,n) ({ void __user * __cl_addr = (addr); unsigned long __cl_size = (n); if (__cl_size && access_ok(VERIFY_WRITE, ((unsigned long)(__cl_addr)), __cl_size)) __cl_size = __clear_user(__cl_addr, __cl_size); __cl_size; })
|
/prebuilts/ndk/9/platforms/android-13/arch-mips/usr/include/asm/ |
uaccess.h | 47 #define access_ok(type, addr, size) likely(__access_ok((unsigned long)(addr), (size), __access_mask)) macro 60 #define __get_user_check(x, ptr, size) ({ long __gu_err = -EFAULT; const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) __get_user_common((x), size, __gu_ptr); __gu_err; }) 66 #define __put_user_check(x, ptr, size) ({ __typeof__(*(ptr)) __user *__pu_addr = (ptr); __typeof__(*(ptr)) __pu_val = (x); long __pu_err = -EFAULT; if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) { switch (size) { case 1: __put_user_asm("sb", __pu_addr); break; case 2: __put_user_asm("sh", __pu_addr); break; case 4: __put_user_asm("sw", __pu_addr); break; case 8: __PUT_USER_DW(__pu_addr); break; default: __put_user_unknown(); break; } } __pu_err; }) 82 #define copy_to_user(to, from, n) ({ void __user *__cu_to; const void *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 87 #define copy_from_user(to, from, n) ({ void *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_READ, __cu_from, __cu_len)) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 90 #define copy_in_user(to, from, n) ({ void __user *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && access_ok(VERIFY_WRITE, __cu_to, __cu_len))) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 91 #define clear_user(addr,n) ({ void __user * __cl_addr = (addr); unsigned long __cl_size = (n); if (__cl_size && access_ok(VERIFY_WRITE, ((unsigned long)(__cl_addr)), __cl_size)) __cl_size = __clear_user(__cl_addr, __cl_size); __cl_size; })
|
/prebuilts/ndk/9/platforms/android-14/arch-mips/usr/include/asm/ |
uaccess.h | 47 #define access_ok(type, addr, size) likely(__access_ok((unsigned long)(addr), (size), __access_mask)) macro 60 #define __get_user_check(x, ptr, size) ({ long __gu_err = -EFAULT; const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) __get_user_common((x), size, __gu_ptr); __gu_err; }) 66 #define __put_user_check(x, ptr, size) ({ __typeof__(*(ptr)) __user *__pu_addr = (ptr); __typeof__(*(ptr)) __pu_val = (x); long __pu_err = -EFAULT; if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) { switch (size) { case 1: __put_user_asm("sb", __pu_addr); break; case 2: __put_user_asm("sh", __pu_addr); break; case 4: __put_user_asm("sw", __pu_addr); break; case 8: __PUT_USER_DW(__pu_addr); break; default: __put_user_unknown(); break; } } __pu_err; }) 82 #define copy_to_user(to, from, n) ({ void __user *__cu_to; const void *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 87 #define copy_from_user(to, from, n) ({ void *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_READ, __cu_from, __cu_len)) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 90 #define copy_in_user(to, from, n) ({ void __user *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && access_ok(VERIFY_WRITE, __cu_to, __cu_len))) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 91 #define clear_user(addr,n) ({ void __user * __cl_addr = (addr); unsigned long __cl_size = (n); if (__cl_size && access_ok(VERIFY_WRITE, ((unsigned long)(__cl_addr)), __cl_size)) __cl_size = __clear_user(__cl_addr, __cl_size); __cl_size; })
|
/prebuilts/ndk/9/platforms/android-15/arch-mips/usr/include/asm/ |
uaccess.h | 47 #define access_ok(type, addr, size) likely(__access_ok((unsigned long)(addr), (size), __access_mask)) macro 60 #define __get_user_check(x, ptr, size) ({ long __gu_err = -EFAULT; const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) __get_user_common((x), size, __gu_ptr); __gu_err; }) 66 #define __put_user_check(x, ptr, size) ({ __typeof__(*(ptr)) __user *__pu_addr = (ptr); __typeof__(*(ptr)) __pu_val = (x); long __pu_err = -EFAULT; if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) { switch (size) { case 1: __put_user_asm("sb", __pu_addr); break; case 2: __put_user_asm("sh", __pu_addr); break; case 4: __put_user_asm("sw", __pu_addr); break; case 8: __PUT_USER_DW(__pu_addr); break; default: __put_user_unknown(); break; } } __pu_err; }) 82 #define copy_to_user(to, from, n) ({ void __user *__cu_to; const void *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 87 #define copy_from_user(to, from, n) ({ void *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_READ, __cu_from, __cu_len)) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 90 #define copy_in_user(to, from, n) ({ void __user *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && access_ok(VERIFY_WRITE, __cu_to, __cu_len))) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 91 #define clear_user(addr,n) ({ void __user * __cl_addr = (addr); unsigned long __cl_size = (n); if (__cl_size && access_ok(VERIFY_WRITE, ((unsigned long)(__cl_addr)), __cl_size)) __cl_size = __clear_user(__cl_addr, __cl_size); __cl_size; })
|
/prebuilts/ndk/9/platforms/android-16/arch-mips/usr/include/asm/ |
uaccess.h | 47 #define access_ok(type, addr, size) likely(__access_ok((unsigned long)(addr), (size), __access_mask)) macro 60 #define __get_user_check(x, ptr, size) ({ long __gu_err = -EFAULT; const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) __get_user_common((x), size, __gu_ptr); __gu_err; }) 66 #define __put_user_check(x, ptr, size) ({ __typeof__(*(ptr)) __user *__pu_addr = (ptr); __typeof__(*(ptr)) __pu_val = (x); long __pu_err = -EFAULT; if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) { switch (size) { case 1: __put_user_asm("sb", __pu_addr); break; case 2: __put_user_asm("sh", __pu_addr); break; case 4: __put_user_asm("sw", __pu_addr); break; case 8: __PUT_USER_DW(__pu_addr); break; default: __put_user_unknown(); break; } } __pu_err; }) 82 #define copy_to_user(to, from, n) ({ void __user *__cu_to; const void *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 87 #define copy_from_user(to, from, n) ({ void *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_READ, __cu_from, __cu_len)) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 90 #define copy_in_user(to, from, n) ({ void __user *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && access_ok(VERIFY_WRITE, __cu_to, __cu_len))) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 91 #define clear_user(addr,n) ({ void __user * __cl_addr = (addr); unsigned long __cl_size = (n); if (__cl_size && access_ok(VERIFY_WRITE, ((unsigned long)(__cl_addr)), __cl_size)) __cl_size = __clear_user(__cl_addr, __cl_size); __cl_size; })
|
/prebuilts/ndk/9/platforms/android-17/arch-mips/usr/include/asm/ |
uaccess.h | 47 #define access_ok(type, addr, size) likely(__access_ok((unsigned long)(addr), (size), __access_mask)) macro 60 #define __get_user_check(x, ptr, size) ({ long __gu_err = -EFAULT; const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) __get_user_common((x), size, __gu_ptr); __gu_err; }) 66 #define __put_user_check(x, ptr, size) ({ __typeof__(*(ptr)) __user *__pu_addr = (ptr); __typeof__(*(ptr)) __pu_val = (x); long __pu_err = -EFAULT; if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) { switch (size) { case 1: __put_user_asm("sb", __pu_addr); break; case 2: __put_user_asm("sh", __pu_addr); break; case 4: __put_user_asm("sw", __pu_addr); break; case 8: __PUT_USER_DW(__pu_addr); break; default: __put_user_unknown(); break; } } __pu_err; }) 82 #define copy_to_user(to, from, n) ({ void __user *__cu_to; const void *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 87 #define copy_from_user(to, from, n) ({ void *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_READ, __cu_from, __cu_len)) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 90 #define copy_in_user(to, from, n) ({ void __user *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && access_ok(VERIFY_WRITE, __cu_to, __cu_len))) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 91 #define clear_user(addr,n) ({ void __user * __cl_addr = (addr); unsigned long __cl_size = (n); if (__cl_size && access_ok(VERIFY_WRITE, ((unsigned long)(__cl_addr)), __cl_size)) __cl_size = __clear_user(__cl_addr, __cl_size); __cl_size; })
|
/prebuilts/ndk/9/platforms/android-18/arch-mips/usr/include/asm/ |
uaccess.h | 47 #define access_ok(type, addr, size) likely(__access_ok((unsigned long)(addr), (size), __access_mask)) macro 60 #define __get_user_check(x, ptr, size) ({ long __gu_err = -EFAULT; const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) __get_user_common((x), size, __gu_ptr); __gu_err; }) 66 #define __put_user_check(x, ptr, size) ({ __typeof__(*(ptr)) __user *__pu_addr = (ptr); __typeof__(*(ptr)) __pu_val = (x); long __pu_err = -EFAULT; if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) { switch (size) { case 1: __put_user_asm("sb", __pu_addr); break; case 2: __put_user_asm("sh", __pu_addr); break; case 4: __put_user_asm("sw", __pu_addr); break; case 8: __PUT_USER_DW(__pu_addr); break; default: __put_user_unknown(); break; } } __pu_err; }) 82 #define copy_to_user(to, from, n) ({ void __user *__cu_to; const void *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 87 #define copy_from_user(to, from, n) ({ void *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_READ, __cu_from, __cu_len)) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 90 #define copy_in_user(to, from, n) ({ void __user *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && access_ok(VERIFY_WRITE, __cu_to, __cu_len))) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 91 #define clear_user(addr,n) ({ void __user * __cl_addr = (addr); unsigned long __cl_size = (n); if (__cl_size && access_ok(VERIFY_WRITE, ((unsigned long)(__cl_addr)), __cl_size)) __cl_size = __clear_user(__cl_addr, __cl_size); __cl_size; })
|
/prebuilts/ndk/9/platforms/android-19/arch-mips/usr/include/asm/ |
uaccess.h | 47 #define access_ok(type, addr, size) likely(__access_ok((unsigned long)(addr), (size), __access_mask)) macro 60 #define __get_user_check(x, ptr, size) ({ long __gu_err = -EFAULT; const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) __get_user_common((x), size, __gu_ptr); __gu_err; }) 66 #define __put_user_check(x, ptr, size) ({ __typeof__(*(ptr)) __user *__pu_addr = (ptr); __typeof__(*(ptr)) __pu_val = (x); long __pu_err = -EFAULT; if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) { switch (size) { case 1: __put_user_asm("sb", __pu_addr); break; case 2: __put_user_asm("sh", __pu_addr); break; case 4: __put_user_asm("sw", __pu_addr); break; case 8: __PUT_USER_DW(__pu_addr); break; default: __put_user_unknown(); break; } } __pu_err; }) 82 #define copy_to_user(to, from, n) ({ void __user *__cu_to; const void *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 87 #define copy_from_user(to, from, n) ({ void *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_READ, __cu_from, __cu_len)) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 90 #define copy_in_user(to, from, n) ({ void __user *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && access_ok(VERIFY_WRITE, __cu_to, __cu_len))) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 91 #define clear_user(addr,n) ({ void __user * __cl_addr = (addr); unsigned long __cl_size = (n); if (__cl_size && access_ok(VERIFY_WRITE, ((unsigned long)(__cl_addr)), __cl_size)) __cl_size = __clear_user(__cl_addr, __cl_size); __cl_size; })
|
/prebuilts/ndk/9/platforms/android-9/arch-mips/usr/include/asm/ |
uaccess.h | 47 #define access_ok(type, addr, size) likely(__access_ok((unsigned long)(addr), (size), __access_mask)) macro 60 #define __get_user_check(x, ptr, size) ({ long __gu_err = -EFAULT; const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) __get_user_common((x), size, __gu_ptr); __gu_err; }) 66 #define __put_user_check(x, ptr, size) ({ __typeof__(*(ptr)) __user *__pu_addr = (ptr); __typeof__(*(ptr)) __pu_val = (x); long __pu_err = -EFAULT; if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) { switch (size) { case 1: __put_user_asm("sb", __pu_addr); break; case 2: __put_user_asm("sh", __pu_addr); break; case 4: __put_user_asm("sw", __pu_addr); break; case 8: __PUT_USER_DW(__pu_addr); break; default: __put_user_unknown(); break; } } __pu_err; }) 82 #define copy_to_user(to, from, n) ({ void __user *__cu_to; const void *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 87 #define copy_from_user(to, from, n) ({ void *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (access_ok(VERIFY_READ, __cu_from, __cu_len)) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 90 #define copy_in_user(to, from, n) ({ void __user *__cu_to; const void __user *__cu_from; long __cu_len; might_sleep(); __cu_to = (to); __cu_from = (from); __cu_len = (n); if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && access_ok(VERIFY_WRITE, __cu_to, __cu_len))) __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, __cu_len); __cu_len; }) 91 #define clear_user(addr,n) ({ void __user * __cl_addr = (addr); unsigned long __cl_size = (n); if (__cl_size && access_ok(VERIFY_WRITE, ((unsigned long)(__cl_addr)), __cl_size)) __cl_size = __clear_user(__cl_addr, __cl_size); __cl_size; })
|
/development/ndk/platforms/android-3/arch-arm/include/asm/ |
uaccess.h | 41 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) macro
|
/prebuilts/ndk/4/platforms/android-3/arch-arm/usr/include/asm/ |
uaccess.h | 41 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) macro
|
/prebuilts/ndk/4/platforms/android-4/arch-arm/usr/include/asm/ |
uaccess.h | 41 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) macro
|
/prebuilts/ndk/4/platforms/android-5/arch-arm/usr/include/asm/ |
uaccess.h | 41 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) macro
|
/prebuilts/ndk/4/platforms/android-8/arch-arm/usr/include/asm/ |
uaccess.h | 41 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) macro
|
/prebuilts/ndk/5/platforms/android-3/arch-arm/usr/include/asm/ |
uaccess.h | 41 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) macro
|
/prebuilts/ndk/6/platforms/android-3/arch-arm/usr/include/asm/ |
uaccess.h | 41 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) macro
|
/prebuilts/ndk/7/platforms/android-14/arch-arm/usr/include/asm/ |
uaccess.h | 41 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) macro
|
/prebuilts/ndk/7/platforms/android-3/arch-arm/usr/include/asm/ |
uaccess.h | 41 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) macro
|
/prebuilts/ndk/7/platforms/android-4/arch-arm/usr/include/asm/ |
uaccess.h | 41 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) macro
|
/prebuilts/ndk/7/platforms/android-5/arch-arm/usr/include/asm/ |
uaccess.h | 41 #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) macro
|