diff options
author | tb <> | 2024-02-24 15:30:14 +0000 |
---|---|---|
committer | tb <> | 2024-02-24 15:30:14 +0000 |
commit | c10c5b524e3121f42c9239d737dd7f975638f378 (patch) | |
tree | 162dfb371639bf1514d472f64e2a4d1279851907 /src/lib/libcrypto/camellia | |
parent | 1f31ec76cd83a26559f7a7ee2623bce8b503473d (diff) | |
download | openbsd-c10c5b524e3121f42c9239d737dd7f975638f378.tar.gz openbsd-c10c5b524e3121f42c9239d737dd7f975638f378.tar.bz2 openbsd-c10c5b524e3121f42c9239d737dd7f975638f378.zip |
Replace uses of endbr64 with _CET_ENDBR from cet.h
cet.h is needed for other platforms to emit the relevant .gnu.properties
sections that are necessary for them to enable IBT. It also avoids issues
with older toolchains on macOS that explode on encountering endbr64.
based on a diff by kettenis
ok beck kettenis
Diffstat (limited to 'src/lib/libcrypto/camellia')
-rw-r--r-- | src/lib/libcrypto/camellia/asm/cmll-x86_64.pl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/camellia/asm/cmll-x86_64.pl b/src/lib/libcrypto/camellia/asm/cmll-x86_64.pl index 3ceed3e899..187f0596d7 100644 --- a/src/lib/libcrypto/camellia/asm/cmll-x86_64.pl +++ b/src/lib/libcrypto/camellia/asm/cmll-x86_64.pl | |||
@@ -116,7 +116,7 @@ $code=<<___; | |||
116 | .type Camellia_EncryptBlock,\@abi-omnipotent | 116 | .type Camellia_EncryptBlock,\@abi-omnipotent |
117 | .align 16 | 117 | .align 16 |
118 | Camellia_EncryptBlock: | 118 | Camellia_EncryptBlock: |
119 | endbr64 | 119 | _CET_ENDBR |
120 | movl \$128,%eax | 120 | movl \$128,%eax |
121 | subl $arg0d,%eax | 121 | subl $arg0d,%eax |
122 | movl \$3,$arg0d | 122 | movl \$3,$arg0d |
@@ -129,7 +129,7 @@ Camellia_EncryptBlock: | |||
129 | .align 16 | 129 | .align 16 |
130 | .Lenc_rounds: | 130 | .Lenc_rounds: |
131 | Camellia_EncryptBlock_Rounds: | 131 | Camellia_EncryptBlock_Rounds: |
132 | endbr64 | 132 | _CET_ENDBR |
133 | push %rbx | 133 | push %rbx |
134 | push %rbp | 134 | push %rbp |
135 | push %r13 | 135 | push %r13 |
@@ -178,7 +178,7 @@ Camellia_EncryptBlock_Rounds: | |||
178 | .type _x86_64_Camellia_encrypt,\@abi-omnipotent | 178 | .type _x86_64_Camellia_encrypt,\@abi-omnipotent |
179 | .align 16 | 179 | .align 16 |
180 | _x86_64_Camellia_encrypt: | 180 | _x86_64_Camellia_encrypt: |
181 | endbr64 | 181 | _CET_ENDBR |
182 | xor 0($key),@S[1] | 182 | xor 0($key),@S[1] |
183 | xor 4($key),@S[0] # ^=key[0-3] | 183 | xor 4($key),@S[0] # ^=key[0-3] |
184 | xor 8($key),@S[3] | 184 | xor 8($key),@S[3] |
@@ -229,7 +229,7 @@ $code.=<<___; | |||
229 | .type Camellia_DecryptBlock,\@abi-omnipotent | 229 | .type Camellia_DecryptBlock,\@abi-omnipotent |
230 | .align 16 | 230 | .align 16 |
231 | Camellia_DecryptBlock: | 231 | Camellia_DecryptBlock: |
232 | endbr64 | 232 | _CET_ENDBR |
233 | movl \$128,%eax | 233 | movl \$128,%eax |
234 | subl $arg0d,%eax | 234 | subl $arg0d,%eax |
235 | movl \$3,$arg0d | 235 | movl \$3,$arg0d |
@@ -242,7 +242,7 @@ Camellia_DecryptBlock: | |||
242 | .align 16 | 242 | .align 16 |
243 | .Ldec_rounds: | 243 | .Ldec_rounds: |
244 | Camellia_DecryptBlock_Rounds: | 244 | Camellia_DecryptBlock_Rounds: |
245 | endbr64 | 245 | _CET_ENDBR |
246 | push %rbx | 246 | push %rbx |
247 | push %rbp | 247 | push %rbp |
248 | push %r13 | 248 | push %r13 |
@@ -291,7 +291,7 @@ Camellia_DecryptBlock_Rounds: | |||
291 | .type _x86_64_Camellia_decrypt,\@abi-omnipotent | 291 | .type _x86_64_Camellia_decrypt,\@abi-omnipotent |
292 | .align 16 | 292 | .align 16 |
293 | _x86_64_Camellia_decrypt: | 293 | _x86_64_Camellia_decrypt: |
294 | endbr64 | 294 | _CET_ENDBR |
295 | xor 0($key),@S[1] | 295 | xor 0($key),@S[1] |
296 | xor 4($key),@S[0] # ^=key[0-3] | 296 | xor 4($key),@S[0] # ^=key[0-3] |
297 | xor 8($key),@S[3] | 297 | xor 8($key),@S[3] |
@@ -406,7 +406,7 @@ $code.=<<___; | |||
406 | .type Camellia_Ekeygen,\@function,3 | 406 | .type Camellia_Ekeygen,\@function,3 |
407 | .align 16 | 407 | .align 16 |
408 | Camellia_Ekeygen: | 408 | Camellia_Ekeygen: |
409 | endbr64 | 409 | _CET_ENDBR |
410 | push %rbx | 410 | push %rbx |
411 | push %rbp | 411 | push %rbp |
412 | push %r13 | 412 | push %r13 |
@@ -637,7 +637,7 @@ $code.=<<___; | |||
637 | .type Camellia_cbc_encrypt,\@function,6 | 637 | .type Camellia_cbc_encrypt,\@function,6 |
638 | .align 16 | 638 | .align 16 |
639 | Camellia_cbc_encrypt: | 639 | Camellia_cbc_encrypt: |
640 | endbr64 | 640 | _CET_ENDBR |
641 | cmp \$0,%rdx | 641 | cmp \$0,%rdx |
642 | je .Lcbc_abort | 642 | je .Lcbc_abort |
643 | push %rbx | 643 | push %rbx |