kernel-xen/xen3-seccomp-disable-tsc-option

34 lines
1 KiB
Text
Raw Permalink Normal View History

2012-04-14 04:10:33 +04:00
From: Andrea Arcangeli <andrea@cpushare.com>
Subject: [PATCH seccomp: make tsc disabling optional
Patch-mainline: unknown
References: 191123
Make the TSC disable purely paranoid feature optional, so by default seccomp
returns absolutely zerocost.
Ported from 2.6.19 to 2.6.24-rc7 by Jeff Mahoney.
Addition of x86-64 by Jan Beulich.
Signed-off-by: Andrea Arcangeli <andrea@cpushare.com>
Acked-by: Jeff Mahoney <jeffm@suse.com>
Automatically created from "patches.fixes/seccomp-disable-tsc-option" by xen-port-patches.py
--- sle11sp1-2010-02-09.orig/arch/x86/kernel/process-xen.c 2010-02-09 17:12:56.000000000 +0100
+++ sle11sp1-2010-02-09/arch/x86/kernel/process-xen.c 2010-02-09 17:13:11.000000000 +0100
@@ -117,6 +117,7 @@ static void hard_disable_TSC(void)
void disable_TSC(void)
{
+#ifdef CONFIG_SECCOMP_DISABLE_TSC
preempt_disable();
if (!test_and_set_thread_flag(TIF_NOTSC))
/*
@@ -125,6 +126,7 @@ void disable_TSC(void)
*/
hard_disable_TSC();
preempt_enable();
+#endif
}
static void hard_enable_TSC(void)