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
118118 extern void __check_object_size(const void *ptr, unsigned long n,
119119 bool to_user);
120120
121−static inline void check_object_size(const void *ptr, unsigned long n,
122− bool to_user)
121+static __always_inline void check_object_size(const void *ptr, unsigned long n,
122+ bool to_user)
123123 {
124124 if (!__builtin_constant_p(n))
125125 __check_object_size(ptr, n, to_user);