0 | 0 |
Index: openssl-1.0.1/crypto/Makefile
|
1 | 1 |
===================================================================
|
2 | |
--- openssl-1.0.1.orig/crypto/Makefile 2011-12-10 01:37:55.000000000 +0000
|
3 | |
+++ openssl-1.0.1/crypto/Makefile 2012-03-17 09:29:15.000000000 +0000
|
|
2 |
--- openssl-1.0.1.orig/crypto/Makefile 2011-12-10 02:37:55.000000000 +0100
|
|
3 |
+++ openssl-1.0.1/crypto/Makefile 2012-03-17 14:03:25.000000000 +0100
|
4 | 4 |
@@ -60,7 +60,7 @@
|
5 | 5 |
echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
|
6 | 6 |
echo '#endif' ) >buildinf.h
|
|
21 | 21 |
pariscid.s: pariscid.pl; $(PERL) pariscid.pl $(PERLASM_SCHEME) $@
|
22 | 22 |
Index: openssl-1.0.1/crypto/x86_64cpuid.pl
|
23 | 23 |
===================================================================
|
24 | |
--- openssl-1.0.1.orig/crypto/x86_64cpuid.pl 2011-11-14 21:01:16.000000000 +0000
|
25 | |
+++ openssl-1.0.1/crypto/x86_64cpuid.pl 2012-03-17 09:20:04.000000000 +0000
|
|
24 |
--- openssl-1.0.1.orig/crypto/x86_64cpuid.pl 2011-11-14 22:01:16.000000000 +0100
|
|
25 |
+++ openssl-1.0.1/crypto/x86_64cpuid.pl 2012-03-17 14:03:25.000000000 +0100
|
26 | 26 |
@@ -20,7 +20,11 @@
|
27 | 27 |
.extern OPENSSL_cpuid_setup
|
28 | 28 |
.hidden OPENSSL_cpuid_setup
|
|
37 | 37 |
.comm OPENSSL_ia32cap_P,8,4
|
38 | 38 |
Index: openssl-1.0.1/crypto/des/asm/desboth.pl
|
39 | 39 |
===================================================================
|
40 | |
--- openssl-1.0.1.orig/crypto/des/asm/desboth.pl 2001-10-24 21:20:56.000000000 +0000
|
41 | |
+++ openssl-1.0.1/crypto/des/asm/desboth.pl 2012-03-17 09:20:04.000000000 +0000
|
|
40 |
--- openssl-1.0.1.orig/crypto/des/asm/desboth.pl 2001-10-24 23:20:56.000000000 +0200
|
|
41 |
+++ openssl-1.0.1/crypto/des/asm/desboth.pl 2012-03-17 14:03:25.000000000 +0100
|
42 | 42 |
@@ -16,6 +16,11 @@
|
43 | 43 |
|
44 | 44 |
&push("edi");
|
|
78 | 78 |
&mov($L,&DWP(0,"ebx","",0));
|
79 | 79 |
Index: openssl-1.0.1/crypto/rc4/Makefile
|
80 | 80 |
===================================================================
|
81 | |
--- openssl-1.0.1.orig/crypto/rc4/Makefile 2011-11-14 20:42:21.000000000 +0000
|
82 | |
+++ openssl-1.0.1/crypto/rc4/Makefile 2012-03-17 09:20:04.000000000 +0000
|
|
81 |
--- openssl-1.0.1.orig/crypto/rc4/Makefile 2011-11-14 21:42:21.000000000 +0100
|
|
82 |
+++ openssl-1.0.1/crypto/rc4/Makefile 2012-03-17 14:03:25.000000000 +0100
|
83 | 83 |
@@ -44,7 +44,7 @@
|
84 | 84 |
rc4-586.s: asm/rc4-586.pl ../perlasm/x86asm.pl
|
85 | 85 |
$(PERL) asm/rc4-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@
|
|
89 | 89 |
$(PERL) asm/rc4-x86_64.pl $(PERLASM_SCHEME) > $@
|
90 | 90 |
rc4-md5-x86_64.s: asm/rc4-md5-x86_64.pl
|
91 | 91 |
$(PERL) asm/rc4-md5-x86_64.pl $(PERLASM_SCHEME) > $@
|
92 | |
Index: openssl-1.0.1/crypto/rc4/asm/rc4-x86_64.pl
|
93 | |
===================================================================
|
94 | |
--- openssl-1.0.1.orig/crypto/rc4/asm/rc4-x86_64.pl 2011-07-01 14:13:52.000000000 +0000
|
95 | |
+++ openssl-1.0.1/crypto/rc4/asm/rc4-x86_64.pl 2012-03-17 09:28:11.000000000 +0000
|
96 | |
@@ -157,7 +157,11 @@
|
97 | |
mov -4($dat),$YY#b
|
98 | |
cmpl \$-1,256($dat)
|
99 | |
je .LRC4_CHAR
|
100 | |
+#ifdef OPENSSL_PIC
|
101 | |
+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),%r8d
|
102 | |
+#else
|
103 | |
mov OPENSSL_ia32cap_P(%rip),%r8d
|
104 | |
+#endif
|
105 | |
xor $TX[1],$TX[1]
|
106 | |
inc $XX[0]#b
|
107 | |
sub $XX[0],$TX[1]
|
108 | |
@@ -442,7 +446,11 @@
|
109 | |
xor %r10,%r10
|
110 | |
xor %r11,%r11
|
111 | |
|
112 | |
+#ifdef OPENSSL_PIC
|
113 | |
+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),$idx#d
|
114 | |
+#else
|
115 | |
mov OPENSSL_ia32cap_P(%rip),$idx#d
|
116 | |
+#endif
|
117 | |
bt \$20,$idx#d # RC4_CHAR?
|
118 | |
jc .Lc1stloop
|
119 | |
jmp .Lw1stloop
|
120 | |
@@ -506,7 +514,11 @@
|
121 | |
.align 16
|
122 | |
RC4_options:
|
123 | |
lea .Lopts(%rip),%rax
|
124 | |
+#ifdef OPENSSL_PIC
|
125 | |
+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),%edx
|
126 | |
+#else
|
127 | |
mov OPENSSL_ia32cap_P(%rip),%edx
|
128 | |
+#endif
|
129 | |
bt \$20,%edx
|
130 | |
jc .L8xchar
|
131 | |
bt \$30,%edx
|
132 | 92 |
Index: openssl-1.0.1/crypto/perlasm/cbc.pl
|
133 | 93 |
===================================================================
|
134 | |
--- openssl-1.0.1.orig/crypto/perlasm/cbc.pl 2011-07-13 06:22:46.000000000 +0000
|
135 | |
+++ openssl-1.0.1/crypto/perlasm/cbc.pl 2012-03-17 09:20:04.000000000 +0000
|
|
94 |
--- openssl-1.0.1.orig/crypto/perlasm/cbc.pl 2011-07-13 08:22:46.000000000 +0200
|
|
95 |
+++ openssl-1.0.1/crypto/perlasm/cbc.pl 2012-03-17 14:03:25.000000000 +0100
|
136 | 96 |
@@ -122,7 +122,11 @@
|
137 | 97 |
&mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
|
138 | 98 |
&mov(&DWP($data_off+4,"esp","",0), "ebx"); #
|
|
187 | 147 |
&mov("ebx", &DWP($data_off+4,"esp","",0)); #
|
188 | 148 |
Index: openssl-1.0.1/crypto/perlasm/x86_64-xlate.pl
|
189 | 149 |
===================================================================
|
190 | |
--- openssl-1.0.1.orig/crypto/perlasm/x86_64-xlate.pl 2012-03-17 09:19:38.000000000 +0000
|
191 | |
+++ openssl-1.0.1/crypto/perlasm/x86_64-xlate.pl 2012-03-17 09:20:04.000000000 +0000
|
|
150 |
--- openssl-1.0.1.orig/crypto/perlasm/x86_64-xlate.pl 2012-03-13 20:19:31.000000000 +0100
|
|
151 |
+++ openssl-1.0.1/crypto/perlasm/x86_64-xlate.pl 2012-03-17 14:03:25.000000000 +0100
|
192 | 152 |
@@ -786,7 +786,7 @@
|
193 | 153 |
|
194 | 154 |
chomp($line);
|
|
200 | 160 |
|
201 | 161 |
Index: openssl-1.0.1/crypto/perlasm/x86gas.pl
|
202 | 162 |
===================================================================
|
203 | |
--- openssl-1.0.1.orig/crypto/perlasm/x86gas.pl 2011-12-09 19:16:35.000000000 +0000
|
204 | |
+++ openssl-1.0.1/crypto/perlasm/x86gas.pl 2012-03-17 09:30:54.000000000 +0000
|
205 | |
@@ -218,6 +218,15 @@
|
|
163 |
--- openssl-1.0.1.orig/crypto/perlasm/x86gas.pl 2011-12-09 20:16:35.000000000 +0100
|
|
164 |
+++ openssl-1.0.1/crypto/perlasm/x86gas.pl 2012-03-17 14:03:25.000000000 +0100
|
|
165 |
@@ -161,6 +161,7 @@
|
|
166 |
if ($::macosx) { push (@out,"$tmp,2\n"); }
|
|
167 |
elsif ($::elf) { push (@out,"$tmp,4\n"); }
|
|
168 |
else { push (@out,"$tmp\n"); }
|
|
169 |
+ if ($::elf) { push (@out,".hidden\tOPENSSL_ia32cap_P\n"); }
|
|
170 |
}
|
|
171 |
push(@out,$initseg) if ($initseg);
|
|
172 |
}
|
|
173 |
@@ -218,7 +219,17 @@
|
206 | 174 |
elsif ($::elf)
|
207 | 175 |
{ $initseg.=<<___;
|
208 | 176 |
.section .init
|
|
216 | 184 |
+ popl %ebx
|
217 | 185 |
+#else
|
218 | 186 |
call $f
|
|
187 |
+#endif
|
219 | 188 |
___
|
220 | 189 |
}
|
221 | |
Index: openssl-1.0.1/crypto/aes/asm/aes-x86_64.pl
|
222 | |
===================================================================
|
223 | |
--- openssl-1.0.1.orig/crypto/aes/asm/aes-x86_64.pl 2011-11-14 21:01:17.000000000 +0000
|
224 | |
+++ openssl-1.0.1/crypto/aes/asm/aes-x86_64.pl 2012-03-17 09:20:04.000000000 +0000
|
225 | |
@@ -1678,7 +1678,11 @@
|
226 | |
lea .LAES_Td(%rip),$sbox
|
227 | |
.Lcbc_picked_te:
|
228 | |
|
229 | |
+#ifdef OPENSSL_PIC
|
230 | |
+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),%r10d
|
231 | |
+#else
|
232 | |
mov OPENSSL_ia32cap_P(%rip),%r10d
|
233 | |
+#endif
|
234 | |
cmp \$$speed_limit,%rdx
|
235 | |
jb .Lcbc_slow_prologue
|
236 | |
test \$15,%rdx
|
|
190 |
elsif ($::coff)
|
237 | 191 |
Index: openssl-1.0.1/crypto/aes/Makefile
|
238 | 192 |
===================================================================
|
239 | |
--- openssl-1.0.1.orig/crypto/aes/Makefile 2011-11-14 20:42:21.000000000 +0000
|
240 | |
+++ openssl-1.0.1/crypto/aes/Makefile 2012-03-17 09:20:04.000000000 +0000
|
|
193 |
--- openssl-1.0.1.orig/crypto/aes/Makefile 2011-11-14 21:42:21.000000000 +0100
|
|
194 |
+++ openssl-1.0.1/crypto/aes/Makefile 2012-03-17 14:03:25.000000000 +0100
|
241 | 195 |
@@ -55,7 +55,7 @@
|
242 | 196 |
aesni-x86.s: asm/aesni-x86.pl ../perlasm/x86asm.pl
|
243 | 197 |
$(PERL) asm/aesni-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
|
247 | 201 |
$(PERL) asm/aes-x86_64.pl $(PERLASM_SCHEME) > $@
|
248 | 202 |
vpaes-x86_64.s: asm/vpaes-x86_64.pl
|
249 | 203 |
$(PERL) asm/vpaes-x86_64.pl $(PERLASM_SCHEME) > $@
|
|
204 |
Index: openssl-1.0.1/crypto/x86cpuid.pl
|
|
205 |
===================================================================
|
|
206 |
--- openssl-1.0.1.orig/crypto/x86cpuid.pl 2012-02-28 15:20:34.000000000 +0100
|
|
207 |
+++ openssl-1.0.1/crypto/x86cpuid.pl 2012-03-17 14:13:56.000000000 +0100
|
|
208 |
@@ -8,6 +8,8 @@
|
|
209 |
|
|
210 |
for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
|
|
211 |
|
|
212 |
+push(@out, ".hidden OPENSSL_ia32cap_P\n");
|
|
213 |
+
|
|
214 |
&function_begin("OPENSSL_ia32_cpuid");
|
|
215 |
&xor ("edx","edx");
|
|
216 |
&pushf ();
|
|
217 |
@@ -139,9 +141,7 @@
|
|
218 |
&set_label("nocpuid");
|
|
219 |
&function_end("OPENSSL_ia32_cpuid");
|
|
220 |
|
|
221 |
-&external_label("OPENSSL_ia32cap_P");
|
|
222 |
-
|
|
223 |
-&function_begin_B("OPENSSL_rdtsc","EXTRN\t_OPENSSL_ia32cap_P:DWORD");
|
|
224 |
+&function_begin_B("OPENSSL_rdtsc");
|
|
225 |
&xor ("eax","eax");
|
|
226 |
&xor ("edx","edx");
|
|
227 |
&picmeup("ecx","OPENSSL_ia32cap_P");
|
|
228 |
@@ -155,7 +155,7 @@
|
|
229 |
# This works in Ring 0 only [read DJGPP+MS-DOS+privileged DPMI host],
|
|
230 |
# but it's safe to call it on any [supported] 32-bit platform...
|
|
231 |
# Just check for [non-]zero return value...
|
|
232 |
-&function_begin_B("OPENSSL_instrument_halt","EXTRN\t_OPENSSL_ia32cap_P:DWORD");
|
|
233 |
+&function_begin_B("OPENSSL_instrument_halt");
|
|
234 |
&picmeup("ecx","OPENSSL_ia32cap_P");
|
|
235 |
&bt (&DWP(0,"ecx"),4);
|
|
236 |
&jnc (&label("nohalt")); # no TSC
|
|
237 |
@@ -222,7 +222,7 @@
|
|
238 |
&ret ();
|
|
239 |
&function_end_B("OPENSSL_far_spin");
|
|
240 |
|
|
241 |
-&function_begin_B("OPENSSL_wipe_cpu","EXTRN\t_OPENSSL_ia32cap_P:DWORD");
|
|
242 |
+&function_begin_B("OPENSSL_wipe_cpu");
|
|
243 |
&xor ("eax","eax");
|
|
244 |
&xor ("edx","edx");
|
|
245 |
&picmeup("ecx","OPENSSL_ia32cap_P");
|