Loading arch/ia64/include/asm/uaccess.h +4 −8 Original line number Diff line number Diff line Loading @@ -241,7 +241,6 @@ extern unsigned long __must_check __copy_user (void __user *to, const void __use static inline unsigned long __copy_to_user (void __user *to, const void *from, unsigned long count) { if (!__builtin_constant_p(count)) check_object_size(from, count, true); return __copy_user(to, (__force void __user *) from, count); Loading @@ -250,7 +249,6 @@ __copy_to_user (void __user *to, const void *from, unsigned long count) static inline unsigned long __copy_from_user (void *to, const void __user *from, unsigned long count) { if (!__builtin_constant_p(count)) check_object_size(to, count, false); return __copy_user((__force void __user *) to, from, count); Loading @@ -265,7 +263,6 @@ __copy_from_user (void *to, const void __user *from, unsigned long count) long __cu_len = (n); \ \ if (__access_ok(__cu_to, __cu_len, get_fs())) { \ if (!__builtin_constant_p(n)) \ check_object_size(__cu_from, __cu_len, true); \ __cu_len = __copy_user(__cu_to, (__force void __user *) __cu_from, __cu_len); \ } \ Loading @@ -280,7 +277,6 @@ __copy_from_user (void *to, const void __user *from, unsigned long count) \ __chk_user_ptr(__cu_from); \ if (__access_ok(__cu_from, __cu_len, get_fs())) { \ if (!__builtin_constant_p(n)) \ check_object_size(__cu_to, __cu_len, false); \ __cu_len = __copy_user((__force void __user *) __cu_to, __cu_from, __cu_len); \ } \ Loading arch/powerpc/include/asm/uaccess.h +7 −12 Original line number Diff line number Diff line Loading @@ -326,13 +326,11 @@ static inline unsigned long copy_from_user(void *to, unsigned long over; if (access_ok(VERIFY_READ, from, n)) { if (!__builtin_constant_p(n)) check_object_size(to, n, false); return __copy_tofrom_user((__force void __user *)to, from, n); } if ((unsigned long)from < TASK_SIZE) { over = (unsigned long)from + n - TASK_SIZE; if (!__builtin_constant_p(n - over)) check_object_size(to, n - over, false); return __copy_tofrom_user((__force void __user *)to, from, n - over) + over; Loading @@ -346,13 +344,11 @@ static inline unsigned long copy_to_user(void __user *to, unsigned long over; if (access_ok(VERIFY_WRITE, to, n)) { if (!__builtin_constant_p(n)) check_object_size(from, n, true); return __copy_tofrom_user(to, (__force void __user *)from, n); } if ((unsigned long)to < TASK_SIZE) { over = (unsigned long)to + n - TASK_SIZE; if (!__builtin_constant_p(n)) check_object_size(from, n - over, true); return __copy_tofrom_user(to, (__force void __user *)from, n - over) + over; Loading Loading @@ -398,7 +394,6 @@ static inline unsigned long __copy_from_user_inatomic(void *to, return 0; } if (!__builtin_constant_p(n)) check_object_size(to, n, false); return __copy_tofrom_user((__force void __user *)to, from, n); Loading Loading @@ -427,7 +422,7 @@ static inline unsigned long __copy_to_user_inatomic(void __user *to, if (ret == 0) return 0; } if (!__builtin_constant_p(n)) check_object_size(from, n, true); return __copy_tofrom_user(to, (__force const void __user *)from, n); Loading arch/sparc/include/asm/uaccess_32.h +3 −6 Original line number Diff line number Diff line Loading @@ -314,7 +314,6 @@ unsigned long __copy_user(void __user *to, const void __user *from, unsigned lon static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n) { if (n && __access_ok((unsigned long) to, n)) { if (!__builtin_constant_p(n)) check_object_size(from, n, true); return __copy_user(to, (__force void __user *) from, n); } else Loading @@ -323,7 +322,6 @@ static inline unsigned long copy_to_user(void __user *to, const void *from, unsi static inline unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n) { if (!__builtin_constant_p(n)) check_object_size(from, n, true); return __copy_user(to, (__force void __user *) from, n); } Loading @@ -331,7 +329,6 @@ static inline unsigned long __copy_to_user(void __user *to, const void *from, un static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) { if (n && __access_ok((unsigned long) from, n)) { if (!__builtin_constant_p(n)) check_object_size(to, n, false); return __copy_user((__force void __user *) to, from, n); } else Loading arch/sparc/include/asm/uaccess_64.h +3 −4 Original line number Diff line number Diff line Loading @@ -252,7 +252,6 @@ copy_from_user(void *to, const void __user *from, unsigned long size) { unsigned long ret; if (!__builtin_constant_p(size)) check_object_size(to, size, false); ret = ___copy_from_user(to, from, size); Loading @@ -273,8 +272,8 @@ copy_to_user(void __user *to, const void *from, unsigned long size) { unsigned long ret; if (!__builtin_constant_p(size)) check_object_size(from, size, true); ret = ___copy_to_user(to, from, size); if (unlikely(ret)) ret = copy_to_user_fixup(to, from, size); Loading include/linux/thread_info.h +2 −1 Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ extern void __check_object_size(const void *ptr, unsigned long n, static inline void check_object_size(const void *ptr, unsigned long n, bool to_user) { if (!__builtin_constant_p(n)) __check_object_size(ptr, n, to_user); } #else Loading Loading
arch/ia64/include/asm/uaccess.h +4 −8 Original line number Diff line number Diff line Loading @@ -241,7 +241,6 @@ extern unsigned long __must_check __copy_user (void __user *to, const void __use static inline unsigned long __copy_to_user (void __user *to, const void *from, unsigned long count) { if (!__builtin_constant_p(count)) check_object_size(from, count, true); return __copy_user(to, (__force void __user *) from, count); Loading @@ -250,7 +249,6 @@ __copy_to_user (void __user *to, const void *from, unsigned long count) static inline unsigned long __copy_from_user (void *to, const void __user *from, unsigned long count) { if (!__builtin_constant_p(count)) check_object_size(to, count, false); return __copy_user((__force void __user *) to, from, count); Loading @@ -265,7 +263,6 @@ __copy_from_user (void *to, const void __user *from, unsigned long count) long __cu_len = (n); \ \ if (__access_ok(__cu_to, __cu_len, get_fs())) { \ if (!__builtin_constant_p(n)) \ check_object_size(__cu_from, __cu_len, true); \ __cu_len = __copy_user(__cu_to, (__force void __user *) __cu_from, __cu_len); \ } \ Loading @@ -280,7 +277,6 @@ __copy_from_user (void *to, const void __user *from, unsigned long count) \ __chk_user_ptr(__cu_from); \ if (__access_ok(__cu_from, __cu_len, get_fs())) { \ if (!__builtin_constant_p(n)) \ check_object_size(__cu_to, __cu_len, false); \ __cu_len = __copy_user((__force void __user *) __cu_to, __cu_from, __cu_len); \ } \ Loading
arch/powerpc/include/asm/uaccess.h +7 −12 Original line number Diff line number Diff line Loading @@ -326,13 +326,11 @@ static inline unsigned long copy_from_user(void *to, unsigned long over; if (access_ok(VERIFY_READ, from, n)) { if (!__builtin_constant_p(n)) check_object_size(to, n, false); return __copy_tofrom_user((__force void __user *)to, from, n); } if ((unsigned long)from < TASK_SIZE) { over = (unsigned long)from + n - TASK_SIZE; if (!__builtin_constant_p(n - over)) check_object_size(to, n - over, false); return __copy_tofrom_user((__force void __user *)to, from, n - over) + over; Loading @@ -346,13 +344,11 @@ static inline unsigned long copy_to_user(void __user *to, unsigned long over; if (access_ok(VERIFY_WRITE, to, n)) { if (!__builtin_constant_p(n)) check_object_size(from, n, true); return __copy_tofrom_user(to, (__force void __user *)from, n); } if ((unsigned long)to < TASK_SIZE) { over = (unsigned long)to + n - TASK_SIZE; if (!__builtin_constant_p(n)) check_object_size(from, n - over, true); return __copy_tofrom_user(to, (__force void __user *)from, n - over) + over; Loading Loading @@ -398,7 +394,6 @@ static inline unsigned long __copy_from_user_inatomic(void *to, return 0; } if (!__builtin_constant_p(n)) check_object_size(to, n, false); return __copy_tofrom_user((__force void __user *)to, from, n); Loading Loading @@ -427,7 +422,7 @@ static inline unsigned long __copy_to_user_inatomic(void __user *to, if (ret == 0) return 0; } if (!__builtin_constant_p(n)) check_object_size(from, n, true); return __copy_tofrom_user(to, (__force const void __user *)from, n); Loading
arch/sparc/include/asm/uaccess_32.h +3 −6 Original line number Diff line number Diff line Loading @@ -314,7 +314,6 @@ unsigned long __copy_user(void __user *to, const void __user *from, unsigned lon static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n) { if (n && __access_ok((unsigned long) to, n)) { if (!__builtin_constant_p(n)) check_object_size(from, n, true); return __copy_user(to, (__force void __user *) from, n); } else Loading @@ -323,7 +322,6 @@ static inline unsigned long copy_to_user(void __user *to, const void *from, unsi static inline unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n) { if (!__builtin_constant_p(n)) check_object_size(from, n, true); return __copy_user(to, (__force void __user *) from, n); } Loading @@ -331,7 +329,6 @@ static inline unsigned long __copy_to_user(void __user *to, const void *from, un static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) { if (n && __access_ok((unsigned long) from, n)) { if (!__builtin_constant_p(n)) check_object_size(to, n, false); return __copy_user((__force void __user *) to, from, n); } else Loading
arch/sparc/include/asm/uaccess_64.h +3 −4 Original line number Diff line number Diff line Loading @@ -252,7 +252,6 @@ copy_from_user(void *to, const void __user *from, unsigned long size) { unsigned long ret; if (!__builtin_constant_p(size)) check_object_size(to, size, false); ret = ___copy_from_user(to, from, size); Loading @@ -273,8 +272,8 @@ copy_to_user(void __user *to, const void *from, unsigned long size) { unsigned long ret; if (!__builtin_constant_p(size)) check_object_size(from, size, true); ret = ___copy_to_user(to, from, size); if (unlikely(ret)) ret = copy_to_user_fixup(to, from, size); Loading
include/linux/thread_info.h +2 −1 Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ extern void __check_object_size(const void *ptr, unsigned long n, static inline void check_object_size(const void *ptr, unsigned long n, bool to_user) { if (!__builtin_constant_p(n)) __check_object_size(ptr, n, to_user); } #else Loading