* [PATCH 2/9] x86-64 untangle seccomp.h vs thread_info
@ 2005-11-30 4:21 Benjamin LaHaise
0 siblings, 0 replies; only message in thread
From: Benjamin LaHaise @ 2005-11-30 4:21 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
When compiling on x86-64 SMP, seccomp.h introduces an ordering dependancy
on asm/thread_info.h by using inline functions which reference the thread
info declaration before struct task_struct is finished being defined. In
order to avoid this nasty include mess, convert the definitions in
seccomp.h into macros.
---
include/linux/seccomp.h | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
applies-to: 610619c4af824b70bd81f228b24357838223ee50
194f04991a44fec3b21d30f1a137d402132996fc
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h
index dc89116..61eabc3 100644
--- a/include/linux/seccomp.h
+++ b/include/linux/seccomp.h
@@ -13,16 +13,13 @@
typedef struct { int mode; } seccomp_t;
extern void __secure_computing(int);
-static inline void secure_computing(int this_syscall)
-{
- if (unlikely(test_thread_flag(TIF_SECCOMP)))
- __secure_computing(this_syscall);
-}
+#define secure_computing(this_syscall) \
+do { \
+ if (unlikely(test_thread_flag(TIF_SECCOMP))) \
+ __secure_computing(this_syscall); \
+} while (0)
-static inline int has_secure_computing(struct thread_info *ti)
-{
- return unlikely(test_ti_thread_flag(ti, TIF_SECCOMP));
-}
+#define has_secure_computing(ti) unlikely(test_ti_thread_flag(ti, TIF_SECCOMP))
#else /* CONFIG_SECCOMP */
---
0.99.9.GIT
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2005-11-30 4:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-30 4:21 [PATCH 2/9] x86-64 untangle seccomp.h vs thread_info Benjamin LaHaise
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox