summaryrefslogtreecommitdiff
path: root/include/linux/thread_info.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-09-08 00:03:49 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2016-09-08 00:03:49 +0300
commit80a77045daacc660659093b312ca0708b53ed558 (patch)
treec0c4147c449b493946be39e2147f9732594956c2 /include/linux/thread_info.h
parentab29b33a84f6910ebf01a32f69a370886a4283dd (diff)
parent8e1f74ea02cf4562404c48c6882214821552c13f (diff)
downloadlinux-80a77045daacc660659093b312ca0708b53ed558.tar.xz
Merge tag 'usercopy-v4.8-rc6-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull more hardened usercopyfixes from Kees Cook: - force check_object_size() to be inline too - move page-spanning check behind a CONFIG since it's triggering false positives [ Changed the page-spanning config option to depend on EXPERT in the merge. That way it still gets build testing, and you can enable it if you want to, but is never enabled for "normal" configurations ] * tag 'usercopy-v4.8-rc6-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: usercopy: remove page-spanning test for now usercopy: force check_object_size() inline
Diffstat (limited to 'include/linux/thread_info.h')
-rw-r--r--include/linux/thread_info.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index 10c9e601398b..2b5b10eed74f 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -118,8 +118,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);