History

usercopy: force check_object_size() inline

Just for good measure, make sure that check_object_size() is always inlined too, as already done for copy_*_user() and __copy_*_user().

Kees Cook committed 10 years ago

Commit a85d6b81 parent ab29b331 file · +2 −2Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/thread_info.h+2−2
@@ -118,8 +118,8 @@ static inline int arch_within_stack_frames(const void * const stack, · 117 unmodified lines
118extern void __check_object_size(const void *ptr, unsigned long n,118extern void __check_object_size(const void *ptr, unsigned long n,
119 bool to_user);119 bool to_user);
120 120
121static inline void check_object_size(const void *ptr, unsigned long n,121static __always_inline void check_object_size(const void *ptr, unsigned long n,
122 bool to_user)122 bool to_user)
123{123{
124 if (!__builtin_constant_p(n))124 if (!__builtin_constant_p(n))
125 __check_object_size(ptr, n, to_user);125 __check_object_size(ptr, n, to_user);