1 From: Andrea Arcangeli <andrea@cpushare.com>
2 Subject: [PATCH seccomp: make tsc disabling optional
3 Patch-mainline: unknown
6 Make the TSC disable purely paranoid feature optional, so by default seccomp
7 returns absolutely zerocost.
9 Ported from 2.6.19 to 2.6.24-rc7 by Jeff Mahoney.
10 Addition of x86-64 by Jan Beulich.
12 Signed-off-by: Andrea Arcangeli <andrea@cpushare.com>
13 Acked-by: Jeff Mahoney <jeffm@suse.com>
14 Automatically created from "patches.fixes/seccomp-disable-tsc-option" by xen-port-patches.py
16 Index: head-2008-10-01/arch/x86/kernel/process_32-xen.c
17 ===================================================================
18 --- head-2008-10-01.orig/arch/x86/kernel/process_32-xen.c 2008-10-01 16:18:30.000000000 +0200
19 +++ head-2008-10-01/arch/x86/kernel/process_32-xen.c 2008-10-01 16:20:58.000000000 +0200
20 @@ -383,6 +383,7 @@ static void hard_disable_TSC(void)
22 void disable_TSC(void)
24 +#ifdef CONFIG_SECCOMP_DISABLE_TSC
26 if (!test_and_set_thread_flag(TIF_NOTSC))
28 @@ -391,6 +392,7 @@ void disable_TSC(void)
35 static void hard_enable_TSC(void)
36 Index: head-2008-10-01/arch/x86/kernel/process_64-xen.c
37 ===================================================================
38 --- head-2008-10-01.orig/arch/x86/kernel/process_64-xen.c 2008-10-01 16:20:19.000000000 +0200
39 +++ head-2008-10-01/arch/x86/kernel/process_64-xen.c 2008-10-01 16:20:58.000000000 +0200
40 @@ -423,6 +423,7 @@ static void hard_disable_TSC(void)
42 void disable_TSC(void)
44 +#ifdef CONFIG_SECCOMP_DISABLE_TSC
46 if (!test_and_set_thread_flag(TIF_NOTSC))
48 @@ -431,6 +432,7 @@ void disable_TSC(void)
55 static void hard_enable_TSC(void)