summaryrefslogtreecommitdiffstats
path: root/ignored/CVE-2005-0109.patch
blob: 09f07427af11dfb7dc2a94b2ec79ed42eb255156 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
diff -urN x/Documentation/kernel-parameters.txt y/Documentation/kernel-parameters.txt
--- x/Documentation/kernel-parameters.txt	2004-08-24 17:20:00.000000000 +1000
+++ y/Documentation/kernel-parameters.txt	2005-05-19 20:25:10.000000000 +1000
@@ -451,6 +451,10 @@
 	hisax=		[HW,ISDN]
 			See Documentation/isdn/README.HiSax.
 
+	ht=		[HW,IA-32,SMP]
+			ht=on: Enable Hyper Threading
+			ht=off: Disable Hyper Threading
+
 	hugepages=	[HW,IA-32,IA-64] Maximal number of HugeTLB pages.
 
 	noirqbalance	[IA-32,SMP,KNL] Disable kernel irq balancing
diff -urN x/arch/i386/Kconfig y/arch/i386/Kconfig
--- x/arch/i386/Kconfig	2005-04-06 20:07:04.000000000 +1000
+++ y/arch/i386/Kconfig	2005-05-19 20:19:55.000000000 +1000
@@ -1326,6 +1326,11 @@
 	depends on SMP && !(X86_VISWS || X86_VOYAGER)
 	default y
 
+config X86_HT_DISABLE
+	bool
+	depends on X86_HT
+	default y
+
 config X86_BIOS_REBOOT
 	bool
 	depends on !(X86_VISWS || X86_VOYAGER)
diff -urN x/arch/i386/kernel/cpu/intel.c y/arch/i386/kernel/cpu/intel.c
--- x/arch/i386/kernel/cpu/intel.c	2004-08-24 17:16:24.000000000 +1000
+++ y/arch/i386/kernel/cpu/intel.c	2005-05-19 20:19:07.000000000 +1000
@@ -267,6 +267,7 @@
 #ifdef CONFIG_X86_HT
 	if (cpu_has(c, X86_FEATURE_HT)) {
 		extern	int phys_proc_id[NR_CPUS];
+		extern	int disable_ht;
 		
 		u32 	eax, ebx, ecx, edx;
 		int 	index_lsb, index_msb, tmp;
@@ -275,6 +276,9 @@
 		cpuid(1, &eax, &ebx, &ecx, &edx);
 		smp_num_siblings = (ebx & 0xff0000) >> 16;
 
+		if (disable_ht)
+			smp_num_siblings = 1;
+
 		if (smp_num_siblings == 1) {
 			printk(KERN_INFO  "CPU: Hyper-Threading is disabled\n");
 		} else if (smp_num_siblings > 1 ) {
diff -urN x/arch/i386/kernel/setup.c y/arch/i386/kernel/setup.c
--- x/arch/i386/kernel/setup.c	2005-04-06 20:11:18.000000000 +1000
+++ y/arch/i386/kernel/setup.c	2005-05-19 20:18:01.000000000 +1000
@@ -57,6 +57,13 @@
 unsigned long init_pg_tables_end __initdata = ~0UL;
 
 int disable_pse __initdata = 0;
+#ifdef CONFIG_X86_HT
+#ifdef CONFIG_X86_HT_DISABLE
+int disable_ht __initdata = 1;
+#else
+int disable_ht __initdata = 0;
+#endif
+#endif
 
 /*
  * Machine setup..
@@ -802,6 +809,13 @@
 #endif /* CONFIG_X86_LOCAL_APIC */
 #endif /* CONFIG_ACPI_BOOT */
 
+#ifdef CONFIG_X86_HT
+		else if (!memcmp(from, "ht=on", 5))
+			disable_ht = 0;
+		else if (!memcmp(from, "ht=off", 6))
+			disable_ht = 1;
+#endif
+
 		/*
 		 * highmem=size forces highmem to be exactly 'size' bytes.
 		 * This works even on boxes that have no highmem otherwise.
diff -urN x/arch/x86_64/Kconfig y/arch/x86_64/Kconfig
--- x/arch/x86_64/Kconfig	2004-08-24 17:18:41.000000000 +1000
+++ y/arch/x86_64/Kconfig	2005-05-19 20:20:45.000000000 +1000
@@ -165,6 +165,11 @@
 	bool
 	depends on SMP && !MK8
 	default y
+
+config X86_HT_DISABLE
+	bool
+	depends on X86_HT
+	default y
        
 config MATH_EMULATION
 	bool

© 2014-2024 Faster IT GmbH | imprint | privacy policy