From: Andrea Arcangeli 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. This only applies to i386. Ported from 2.6.19 to 2.6.24-rc7 by Jeff Mahoney. Signed-off-by: Andrea Arcangeli Acked-by: Jeff Mahoney Automatically created from "patches.fixes/seccomp-disable-tsc-option" by xen-port-patches.py Index: head-2008-04-15/arch/x86/kernel/process_32-xen.c =================================================================== --- head-2008-04-15.orig/arch/x86/kernel/process_32-xen.c 2008-04-15 10:47:44.000000000 +0200 +++ head-2008-04-15/arch/x86/kernel/process_32-xen.c 2008-04-15 10:47:49.000000000 +0200 @@ -441,6 +441,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)) /* @@ -449,6 +450,7 @@ void disable_TSC(void) */ hard_disable_TSC(); preempt_enable(); +#endif } static void hard_enable_TSC(void) {