diff options
author | Andrea Arcangeli <andrea@cpushare.com> | 2007-07-16 02:41:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 12:05:50 -0400 |
commit | cf99abace7e07dd8491e7093a9a9ef11d48838ed (patch) | |
tree | 3b7cfd7c76c2c43e6ae3fdaaff3a50a752072424 /kernel | |
parent | 1d9d02feeee89e9132034d504c9a45eeaf618a3d (diff) |
make seccomp zerocost in schedule
This follows a suggestion from Chuck Ebbert on how to make seccomp
absolutely zerocost in schedule too. The only remaining footprint of
seccomp is in terms of the bzImage size that becomes a few bytes (perhaps
even a few kbytes) larger, measure it if you care in the embedded.
Signed-off-by: Andrea Arcangeli <andrea@cpushare.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/seccomp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/seccomp.c b/kernel/seccomp.c index 1dfa8a509726..ad64fcb731f2 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c | |||
@@ -74,6 +74,9 @@ long prctl_set_seccomp(unsigned long seccomp_mode) | |||
74 | if (seccomp_mode && seccomp_mode <= NR_SECCOMP_MODES) { | 74 | if (seccomp_mode && seccomp_mode <= NR_SECCOMP_MODES) { |
75 | current->seccomp.mode = seccomp_mode; | 75 | current->seccomp.mode = seccomp_mode; |
76 | set_thread_flag(TIF_SECCOMP); | 76 | set_thread_flag(TIF_SECCOMP); |
77 | #ifdef TIF_NOTSC | ||
78 | disable_TSC(); | ||
79 | #endif | ||
77 | ret = 0; | 80 | ret = 0; |
78 | } | 81 | } |
79 | 82 | ||