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
2011-04-19 20:09:59 +00:00
--- head-2011-02-17.orig/arch/x86/kernel/process-xen.c 2011-03-03 16:13:18.000000000 +0100
+++ head-2011-02-17/arch/x86/kernel/process-xen.c 2011-03-03 16:13:29.000000000 +0100
@@ -142,6 +142,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))
/*
2011-04-19 20:09:59 +00:00
@@ -150,6 +151,7 @@ void disable_TSC(void)
*/
hard_disable_TSC();
preempt_enable();
+#endif
}
static void hard_enable_TSC(void)