diff options
Diffstat (limited to 'include/linux/seccomp.h')
-rw-r--r-- | include/linux/seccomp.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index 3a2702bbb1d6..dc89116bb1ca 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h | |||
@@ -19,6 +19,11 @@ static inline void secure_computing(int this_syscall) | |||
19 | __secure_computing(this_syscall); | 19 | __secure_computing(this_syscall); |
20 | } | 20 | } |
21 | 21 | ||
22 | static inline int has_secure_computing(struct thread_info *ti) | ||
23 | { | ||
24 | return unlikely(test_ti_thread_flag(ti, TIF_SECCOMP)); | ||
25 | } | ||
26 | |||
22 | #else /* CONFIG_SECCOMP */ | 27 | #else /* CONFIG_SECCOMP */ |
23 | 28 | ||
24 | #if (__GNUC__ > 2) | 29 | #if (__GNUC__ > 2) |
@@ -28,6 +33,11 @@ static inline void secure_computing(int this_syscall) | |||
28 | #endif | 33 | #endif |
29 | 34 | ||
30 | #define secure_computing(x) do { } while (0) | 35 | #define secure_computing(x) do { } while (0) |
36 | /* static inline to preserve typechecking */ | ||
37 | static inline int has_secure_computing(struct thread_info *ti) | ||
38 | { | ||
39 | return 0; | ||
40 | } | ||
31 | 41 | ||
32 | #endif /* CONFIG_SECCOMP */ | 42 | #endif /* CONFIG_SECCOMP */ |
33 | 43 | ||