Commit a85d6b82 authored by Kees Cook's avatar Kees Cook

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().
Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent ab29b33a
...@@ -118,7 +118,7 @@ static inline int arch_within_stack_frames(const void * const stack, ...@@ -118,7 +118,7 @@ static inline int arch_within_stack_frames(const void * const stack,
extern void __check_object_size(const void *ptr, unsigned long n, extern void __check_object_size(const void *ptr, unsigned long n,
bool to_user); bool to_user);
static inline void check_object_size(const void *ptr, unsigned long n, static __always_inline void check_object_size(const void *ptr, unsigned long n,
bool to_user) bool to_user)
{ {
if (!__builtin_constant_p(n)) if (!__builtin_constant_p(n))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment