Annotation of /trunk/kernel26-xen/patches-2.6.25-r1/1031-2.6.25-xen-seccomp-disable-tsc-option.patch
Parent Directory | Revision Log
Revision 609 -
(hide annotations)
(download)
Fri May 23 17:35:37 2008 UTC (16 years, 4 months ago) by niro
File size: 1156 byte(s)
Fri May 23 17:35:37 2008 UTC (16 years, 4 months ago) by niro
File size: 1156 byte(s)
-using opensuse xen patchset, updated kernel configs
1 | niro | 609 | From: Andrea Arcangeli <andrea@cpushare.com> |
2 | Subject: [PATCH seccomp: make tsc disabling optional | ||
3 | Patch-mainline: unknown | ||
4 | References: 191123 | ||
5 | |||
6 | Make the TSC disable purely paranoid feature optional, so by default seccomp | ||
7 | returns absolutely zerocost. | ||
8 | |||
9 | This only applies to i386. | ||
10 | |||
11 | Ported from 2.6.19 to 2.6.24-rc7 by Jeff Mahoney. | ||
12 | |||
13 | Signed-off-by: Andrea Arcangeli <andrea@cpushare.com> | ||
14 | Acked-by: Jeff Mahoney <jeffm@suse.com> | ||
15 | Automatically created from "patches.fixes/seccomp-disable-tsc-option" by xen-port-patches.py | ||
16 | |||
17 | Index: head-2008-04-15/arch/x86/kernel/process_32-xen.c | ||
18 | =================================================================== | ||
19 | --- head-2008-04-15.orig/arch/x86/kernel/process_32-xen.c 2008-04-15 10:47:44.000000000 +0200 | ||
20 | +++ head-2008-04-15/arch/x86/kernel/process_32-xen.c 2008-04-15 10:47:49.000000000 +0200 | ||
21 | @@ -441,6 +441,7 @@ static void hard_disable_TSC(void) | ||
22 | } | ||
23 | void disable_TSC(void) | ||
24 | { | ||
25 | +#ifdef CONFIG_SECCOMP_DISABLE_TSC | ||
26 | preempt_disable(); | ||
27 | if (!test_and_set_thread_flag(TIF_NOTSC)) | ||
28 | /* | ||
29 | @@ -449,6 +450,7 @@ void disable_TSC(void) | ||
30 | */ | ||
31 | hard_disable_TSC(); | ||
32 | preempt_enable(); | ||
33 | +#endif | ||
34 | } | ||
35 | static void hard_enable_TSC(void) | ||
36 | { |