qubes-linux-kernel/patches.xen/xen3-seccomp-disable-tsc-option

34 lines
1.0 KiB
Plaintext
Raw Normal View History

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
--- head-2010-03-24.orig/arch/x86/kernel/process-xen.c 2010-03-25 10:38:31.000000000 +0100
+++ head-2010-03-24/arch/x86/kernel/process-xen.c 2010-03-25 14:37:33.000000000 +0100
@@ -141,6 +141,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))
/*
@@ -149,6 +150,7 @@ void disable_TSC(void)
*/
hard_disable_TSC();
preempt_enable();
+#endif
}
static void hard_enable_TSC(void)