diff options
| author | Kees Cook <keescook@chromium.org> | 2016-09-07 09:39:32 -0700 |
|---|---|---|
| committer | Sami Tolvanen <samitolvanen@google.com> | 2016-09-08 18:10:28 +0000 |
| commit | 93584e7e1b4ea543ed04cff643186946196eaebb (patch) | |
| tree | d51bd08019817c02dcce8d19399002b6ab296af6 /include/linux | |
| parent | 1fd70f71e8f428f0c191a6b86e72e700dbe34bed (diff) | |
UPSTREAM: 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: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Change-Id: Ibfdf4790d03fe426e68d9a864c55a0d1bbfb7d61
(cherry picked from commit a85d6b8242dc78ef3f4542a0f979aebcbe77fc4e)
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/thread_info.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index eded095fe81e..4cf89517783a 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h @@ -158,8 +158,8 @@ static inline int arch_within_stack_frames(const void * const stack, extern void __check_object_size(const void *ptr, unsigned long n, bool to_user); -static inline void check_object_size(const void *ptr, unsigned long n, - bool to_user) +static __always_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); |
