From: Benjamin LaHaise <bcrl@kvack.org>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/9] x86-64 untangle seccomp.h vs thread_info
Date: Tue, 29 Nov 2005 23:21:31 -0500 [thread overview]
Message-ID: <20051130042131.GC19112@kvack.org> (raw)
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
reply other threads:[~2005-11-30 4:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051130042131.GC19112@kvack.org \
--to=bcrl@kvack.org \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.