diff options
Diffstat (limited to 'patches/asm/0004-Revert-Move-constants-out-of-text-segment-into-rodat.patch')
-rw-r--r-- | patches/asm/0004-Revert-Move-constants-out-of-text-segment-into-rodat.patch | 292 |
1 files changed, 292 insertions, 0 deletions
diff --git a/patches/asm/0004-Revert-Move-constants-out-of-text-segment-into-rodat.patch b/patches/asm/0004-Revert-Move-constants-out-of-text-segment-into-rodat.patch new file mode 100644 index 0000000..1a17540 --- /dev/null +++ b/patches/asm/0004-Revert-Move-constants-out-of-text-segment-into-rodat.patch | |||
@@ -0,0 +1,292 @@ | |||
1 | From 87b24a6d5a932061cc88b84a856663b328d1c166 Mon Sep 17 00:00:00 2001 | ||
2 | From: Brent Cook <busterb@gmail.com> | ||
3 | Date: Mon, 30 Oct 2023 22:01:49 -0500 | ||
4 | Subject: [PATCH 4/4] Revert "Move constants out of text segment into rodata to | ||
5 | prepare for xonly support" | ||
6 | |||
7 | This reverts commit b5834617204e7520b0209bcff7f1c4a559e05422. | ||
8 | --- | ||
9 | src/lib/libcrypto/aes/asm/aes-x86_64.pl | 3 +-- | ||
10 | src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl | 4 ++-- | ||
11 | src/lib/libcrypto/aes/asm/aesni-x86_64.pl | 4 ++-- | ||
12 | src/lib/libcrypto/aes/asm/bsaes-x86_64.pl | 3 +-- | ||
13 | src/lib/libcrypto/aes/asm/vpaes-x86_64.pl | 3 +-- | ||
14 | src/lib/libcrypto/bn/asm/x86_64-mont.pl | 4 ++++ | ||
15 | src/lib/libcrypto/bn/asm/x86_64-mont5.pl | 3 +-- | ||
16 | src/lib/libcrypto/camellia/asm/cmll-x86_64.pl | 4 ++-- | ||
17 | src/lib/libcrypto/modes/asm/ghash-x86_64.pl | 4 ++-- | ||
18 | src/lib/libcrypto/sha/asm/sha1-x86_64.pl | 3 +-- | ||
19 | src/lib/libcrypto/sha/asm/sha512-x86_64.pl | 4 ---- | ||
20 | src/lib/libcrypto/whrlpool/asm/wp-x86_64.pl | 1 - | ||
21 | 12 files changed, 17 insertions(+), 23 deletions(-) | ||
22 | |||
23 | diff --git a/src/lib/libcrypto/aes/asm/aes-x86_64.pl b/src/lib/libcrypto/aes/asm/aes-x86_64.pl | ||
24 | index d9f501b25..9072f603a 100755 | ||
25 | --- a/src/lib/libcrypto/aes/asm/aes-x86_64.pl | ||
26 | +++ b/src/lib/libcrypto/aes/asm/aes-x86_64.pl | ||
27 | @@ -2113,7 +2113,6 @@ ___ | ||
28 | } | ||
29 | |||
30 | $code.=<<___; | ||
31 | -.rodata | ||
32 | .align 64 | ||
33 | .LAES_Te: | ||
34 | ___ | ||
35 | @@ -2534,8 +2533,8 @@ ___ | ||
36 | $code.=<<___; | ||
37 | .long 0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe | ||
38 | .long 0x1b1b1b1b, 0x1b1b1b1b, 0, 0 | ||
39 | +.asciz "AES for x86_64, CRYPTOGAMS by <appro\@openssl.org>" | ||
40 | .align 64 | ||
41 | -.previous | ||
42 | ___ | ||
43 | |||
44 | # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, | ||
45 | diff --git a/src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl b/src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl | ||
46 | index 4e83b6ba4..880bcc2d5 100644 | ||
47 | --- a/src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl | ||
48 | +++ b/src/lib/libcrypto/aes/asm/aesni-sha1-x86_64.pl | ||
49 | @@ -1075,7 +1075,6 @@ $code.=<<___; | ||
50 | ___ | ||
51 | } | ||
52 | $code.=<<___; | ||
53 | -.rodata | ||
54 | .align 64 | ||
55 | K_XX_XX: | ||
56 | .long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 # K_00_19 | ||
57 | @@ -1083,8 +1082,9 @@ K_XX_XX: | ||
58 | .long 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc # K_40_59 | ||
59 | .long 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6 # K_60_79 | ||
60 | .long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f # pbswap mask | ||
61 | + | ||
62 | +.asciz "AESNI-CBC+SHA1 stitch for x86_64, CRYPTOGAMS by <appro\@openssl.org>" | ||
63 | .align 64 | ||
64 | -.previous | ||
65 | ___ | ||
66 | |||
67 | # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, | ||
68 | diff --git a/src/lib/libcrypto/aes/asm/aesni-x86_64.pl b/src/lib/libcrypto/aes/asm/aesni-x86_64.pl | ||
69 | index 2ab7106c0..96978bd35 100644 | ||
70 | --- a/src/lib/libcrypto/aes/asm/aesni-x86_64.pl | ||
71 | +++ b/src/lib/libcrypto/aes/asm/aesni-x86_64.pl | ||
72 | @@ -2721,7 +2721,6 @@ ___ | ||
73 | } | ||
74 | |||
75 | $code.=<<___; | ||
76 | -.rodata | ||
77 | .align 64 | ||
78 | .Lbswap_mask: | ||
79 | .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 | ||
80 | @@ -2731,8 +2730,9 @@ $code.=<<___; | ||
81 | .long 1,0,0,0 | ||
82 | .Lxts_magic: | ||
83 | .long 0x87,0,1,0 | ||
84 | + | ||
85 | +.asciz "AES for Intel AES-NI, CRYPTOGAMS by <appro\@openssl.org>" | ||
86 | .align 64 | ||
87 | -.previous | ||
88 | ___ | ||
89 | |||
90 | # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, | ||
91 | diff --git a/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl b/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl | ||
92 | index a40f83601..14dc2c02e 100644 | ||
93 | --- a/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl | ||
94 | +++ b/src/lib/libcrypto/aes/asm/bsaes-x86_64.pl | ||
95 | @@ -2882,7 +2882,6 @@ $code.=<<___; | ||
96 | ___ | ||
97 | } | ||
98 | $code.=<<___; | ||
99 | -.rodata | ||
100 | .type _bsaes_const,\@object | ||
101 | .align 64 | ||
102 | _bsaes_const: | ||
103 | @@ -2935,9 +2934,9 @@ _bsaes_const: | ||
104 | .quad 0x02060a0e03070b0f, 0x0004080c0105090d | ||
105 | .L63: | ||
106 | .quad 0x6363636363636363, 0x6363636363636363 | ||
107 | +.asciz "Bit-sliced AES for x86_64/SSSE3, Emilia Käsper, Peter Schwabe, Andy Polyakov" | ||
108 | .align 64 | ||
109 | .size _bsaes_const,.-_bsaes_const | ||
110 | -.previous | ||
111 | ___ | ||
112 | |||
113 | # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, | ||
114 | diff --git a/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl b/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl | ||
115 | index 63af96c1d..bd7f45b85 100644 | ||
116 | --- a/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl | ||
117 | +++ b/src/lib/libcrypto/aes/asm/vpaes-x86_64.pl | ||
118 | @@ -964,7 +964,6 @@ _vpaes_preheat: | ||
119 | ## Constants ## | ||
120 | ## ## | ||
121 | ######################################################## | ||
122 | -.rodata | ||
123 | .type _vpaes_consts,\@object | ||
124 | .align 64 | ||
125 | _vpaes_consts: | ||
126 | @@ -1061,9 +1060,9 @@ _vpaes_consts: | ||
127 | .Lk_dsbo: # decryption sbox final output | ||
128 | .quad 0x1387EA537EF94000, 0xC7AA6DB9D4943E2D | ||
129 | .quad 0x12D7560F93441D00, 0xCA4B8159D8C58E9C | ||
130 | +.asciz "Vector Permutation AES for x86_64/SSSE3, Mike Hamburg (Stanford University)" | ||
131 | .align 64 | ||
132 | .size _vpaes_consts,.-_vpaes_consts | ||
133 | -.previous | ||
134 | ___ | ||
135 | |||
136 | if ($win64) { | ||
137 | diff --git a/src/lib/libcrypto/bn/asm/x86_64-mont.pl b/src/lib/libcrypto/bn/asm/x86_64-mont.pl | ||
138 | index cae7309d5..c35493e80 100755 | ||
139 | --- a/src/lib/libcrypto/bn/asm/x86_64-mont.pl | ||
140 | +++ b/src/lib/libcrypto/bn/asm/x86_64-mont.pl | ||
141 | @@ -1495,6 +1495,10 @@ $code.=<<___; | ||
142 | .size bn_sqr4x_mont,.-bn_sqr4x_mont | ||
143 | ___ | ||
144 | }}} | ||
145 | +$code.=<<___; | ||
146 | +.asciz "Montgomery Multiplication for x86_64, CRYPTOGAMS by <appro\@openssl.org>" | ||
147 | +.align 16 | ||
148 | +___ | ||
149 | |||
150 | print $code; | ||
151 | close STDOUT; | ||
152 | diff --git a/src/lib/libcrypto/bn/asm/x86_64-mont5.pl b/src/lib/libcrypto/bn/asm/x86_64-mont5.pl | ||
153 | index 5d30f210c..bb7ad4c4b 100755 | ||
154 | --- a/src/lib/libcrypto/bn/asm/x86_64-mont5.pl | ||
155 | +++ b/src/lib/libcrypto/bn/asm/x86_64-mont5.pl | ||
156 | @@ -1032,12 +1032,11 @@ $code.=<<___; | ||
157 | ___ | ||
158 | } | ||
159 | $code.=<<___; | ||
160 | -.rodata | ||
161 | .align 64 | ||
162 | .Linc: | ||
163 | .long 0,0, 1,1 | ||
164 | .long 2,2, 2,2 | ||
165 | -.previous | ||
166 | +.asciz "Montgomery Multiplication with scatter/gather for x86_64, CRYPTOGAMS by <appro\@openssl.org>" | ||
167 | ___ | ||
168 | |||
169 | # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, | ||
170 | diff --git a/src/lib/libcrypto/camellia/asm/cmll-x86_64.pl b/src/lib/libcrypto/camellia/asm/cmll-x86_64.pl | ||
171 | index 90c56d9e5..df6bf11a2 100644 | ||
172 | --- a/src/lib/libcrypto/camellia/asm/cmll-x86_64.pl | ||
173 | +++ b/src/lib/libcrypto/camellia/asm/cmll-x86_64.pl | ||
174 | @@ -599,7 +599,6 @@ sub S0222 { my $i=shift; $i=@SBOX[$i]; $i=($i<<1|$i>>7)&0xff; $i=$i<<16|$i<<8|$i | ||
175 | sub S3033 { my $i=shift; $i=@SBOX[$i]; $i=($i>>1|$i<<7)&0xff; $i=$i<<24|$i<<8|$i; sprintf("0x%08x",$i); } | ||
176 | |||
177 | $code.=<<___; | ||
178 | -.rodata | ||
179 | .align 64 | ||
180 | .LCamellia_SIGMA: | ||
181 | .long 0x3bcc908b, 0xa09e667f, 0x4caa73b2, 0xb67ae858 | ||
182 | @@ -625,7 +624,6 @@ $_ivp="40(%rsp)"; | ||
183 | $_rsp="48(%rsp)"; | ||
184 | |||
185 | $code.=<<___; | ||
186 | -.previous | ||
187 | .globl Camellia_cbc_encrypt | ||
188 | .type Camellia_cbc_encrypt,\@function,6 | ||
189 | .align 16 | ||
190 | @@ -859,6 +857,8 @@ Camellia_cbc_encrypt: | ||
191 | .Lcbc_abort: | ||
192 | ret | ||
193 | .size Camellia_cbc_encrypt,.-Camellia_cbc_encrypt | ||
194 | + | ||
195 | +.asciz "Camellia for x86_64 by <appro\@openssl.org>" | ||
196 | ___ | ||
197 | } | ||
198 | |||
199 | diff --git a/src/lib/libcrypto/modes/asm/ghash-x86_64.pl b/src/lib/libcrypto/modes/asm/ghash-x86_64.pl | ||
200 | index 3ae8629cb..38d779edb 100644 | ||
201 | --- a/src/lib/libcrypto/modes/asm/ghash-x86_64.pl | ||
202 | +++ b/src/lib/libcrypto/modes/asm/ghash-x86_64.pl | ||
203 | @@ -622,7 +622,6 @@ ___ | ||
204 | } | ||
205 | |||
206 | $code.=<<___; | ||
207 | -.rodata | ||
208 | .align 64 | ||
209 | .Lbswap_mask: | ||
210 | .byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 | ||
211 | @@ -669,8 +668,9 @@ $code.=<<___; | ||
212 | .value 0xA7D0,0xA612,0xA454,0xA596,0xA0D8,0xA11A,0xA35C,0xA29E | ||
213 | .value 0xB5E0,0xB422,0xB664,0xB7A6,0xB2E8,0xB32A,0xB16C,0xB0AE | ||
214 | .value 0xBBF0,0xBA32,0xB874,0xB9B6,0xBCF8,0xBD3A,0xBF7C,0xBEBE | ||
215 | + | ||
216 | +.asciz "GHASH for x86_64, CRYPTOGAMS by <appro\@openssl.org>" | ||
217 | .align 64 | ||
218 | -.previous | ||
219 | ___ | ||
220 | |||
221 | # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, | ||
222 | diff --git a/src/lib/libcrypto/sha/asm/sha1-x86_64.pl b/src/lib/libcrypto/sha/asm/sha1-x86_64.pl | ||
223 | index 0abbbab6b..cc8ef5337 100755 | ||
224 | --- a/src/lib/libcrypto/sha/asm/sha1-x86_64.pl | ||
225 | +++ b/src/lib/libcrypto/sha/asm/sha1-x86_64.pl | ||
226 | @@ -1071,7 +1071,6 @@ $code.=<<___; | ||
227 | ___ | ||
228 | } | ||
229 | $code.=<<___; | ||
230 | -.rodata | ||
231 | .align 64 | ||
232 | K_XX_XX: | ||
233 | .long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 # K_00_19 | ||
234 | @@ -1079,10 +1078,10 @@ K_XX_XX: | ||
235 | .long 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc # K_40_59 | ||
236 | .long 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6 # K_60_79 | ||
237 | .long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f # pbswap mask | ||
238 | -.previous | ||
239 | ___ | ||
240 | }}} | ||
241 | $code.=<<___; | ||
242 | +.asciz "SHA1 block transform for x86_64, CRYPTOGAMS by <appro\@openssl.org>" | ||
243 | .align 64 | ||
244 | ___ | ||
245 | |||
246 | diff --git a/src/lib/libcrypto/sha/asm/sha512-x86_64.pl b/src/lib/libcrypto/sha/asm/sha512-x86_64.pl | ||
247 | index 6698b1d40..bc4b2e748 100755 | ||
248 | --- a/src/lib/libcrypto/sha/asm/sha512-x86_64.pl | ||
249 | +++ b/src/lib/libcrypto/sha/asm/sha512-x86_64.pl | ||
250 | @@ -269,7 +269,6 @@ ___ | ||
251 | |||
252 | if ($SZ==4) { | ||
253 | $code.=<<___; | ||
254 | -.rodata | ||
255 | .align 64 | ||
256 | .type $TABLE,\@object | ||
257 | $TABLE: | ||
258 | @@ -289,11 +288,9 @@ $TABLE: | ||
259 | .long 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3 | ||
260 | .long 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208 | ||
261 | .long 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 | ||
262 | -.previous | ||
263 | ___ | ||
264 | } else { | ||
265 | $code.=<<___; | ||
266 | -.rodata | ||
267 | .align 64 | ||
268 | .type $TABLE,\@object | ||
269 | $TABLE: | ||
270 | @@ -337,7 +334,6 @@ $TABLE: | ||
271 | .quad 0x3c9ebe0a15c9bebc,0x431d67c49c100d4c | ||
272 | .quad 0x4cc5d4becb3e42b6,0x597f299cfc657e2a | ||
273 | .quad 0x5fcb6fab3ad6faec,0x6c44198c4a475817 | ||
274 | -.previous | ||
275 | ___ | ||
276 | } | ||
277 | |||
278 | diff --git a/src/lib/libcrypto/whrlpool/asm/wp-x86_64.pl b/src/lib/libcrypto/whrlpool/asm/wp-x86_64.pl | ||
279 | index 510a74b91..afadd5d2f 100644 | ||
280 | --- a/src/lib/libcrypto/whrlpool/asm/wp-x86_64.pl | ||
281 | +++ b/src/lib/libcrypto/whrlpool/asm/wp-x86_64.pl | ||
282 | @@ -204,7 +204,6 @@ $code.=<<___; | ||
283 | ret | ||
284 | .size $func,.-$func | ||
285 | |||
286 | -.rodata | ||
287 | .align 64 | ||
288 | .type $table,\@object | ||
289 | $table: | ||
290 | -- | ||
291 | 2.42.0 | ||
292 | |||