lkml.org 
[lkml]   [2006]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[test patch] seccomp: add code to disable TSC when enabling seccomp
Is the below patch acceptable in generic code, or should some arch
helper function hide it? It lets i386 / x86_64 add TIF_NOTSC
independently.

Also, what prevents this flag from being set on a running process?
If that happens the CPU state and flag could get out of sync and
this could cause problems because of the way the current code tests
the flag.

--- 2.6.18-rc1-nb.orig/fs/proc/base.c
+++ 2.6.18-rc1-nb/fs/proc/base.c
@@ -1025,6 +1025,9 @@ static ssize_t seccomp_write(struct file
if (seccomp_mode && seccomp_mode <= NR_SECCOMP_MODES) {
tsk->seccomp.mode = seccomp_mode;
set_tsk_thread_flag(tsk, TIF_SECCOMP);
+#ifdef TIF_NOTSC
+ set_tsk_thread_flag(tsk, TIF_NOTSC);
+#endif
} else
goto out;
result = -EIO;
--
Chuck
"You can't read a newspaper if you can't read." --George W. Bush
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-07-13 22:19    [W:0.041 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site