Sophie

Sophie

distrib > Mandriva > current > x86_64 > by-pkgid > d41cc2729f5f0fbbd2607b14a49457f3 > files > 102

kernel-xen-2.6.32.11-2mdv2010.1.src.rpm

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)