diff options
| author | Alex Shi <alex.shi@linaro.org> | 2016-08-27 11:27:14 +0800 |
|---|---|---|
| committer | Alex Shi <alex.shi@linaro.org> | 2016-08-27 11:27:14 +0800 |
| commit | 59e65b4bbfe7d0139ab1ab59cd27a5db95f5bb7b (patch) | |
| tree | f33d57c418124a184053ef6bd759ca8a155d6ac6 /include/linux/thread_info.h | |
| parent | e779279da78339ec75fa72571ef901a447762cc6 (diff) | |
| parent | 3ad78bad4fd43467f1fc6dff63076789b30c116b (diff) | |
Merge remote-tracking branch 'v4.4/topic/mm-kaslr-pax_usercopy' into linux-linaro-lsk-v4.4
Diffstat (limited to 'include/linux/thread_info.h')
| -rw-r--r-- | include/linux/thread_info.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index ff307b548ed3..0ae29ff9ccfd 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h @@ -145,6 +145,30 @@ static inline bool test_and_clear_restore_sigmask(void) #error "no set_restore_sigmask() provided and default one won't work" #endif +#ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES +static inline int arch_within_stack_frames(const void * const stack, + const void * const stackend, + const void *obj, unsigned long len) +{ + return 0; +} +#endif + +#ifdef CONFIG_HARDENED_USERCOPY +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) +{ + __check_object_size(ptr, n, to_user); +} +#else +static inline void check_object_size(const void *ptr, unsigned long n, + bool to_user) +{ } +#endif /* CONFIG_HARDENED_USERCOPY */ + #endif /* __KERNEL__ */ #endif /* _LINUX_THREAD_INFO_H */ |
