diff options
| author | tb <> | 2024-02-24 17:53:20 +0000 |
|---|---|---|
| committer | tb <> | 2024-02-24 17:53:20 +0000 |
| commit | cdcdc3f000a66ef2634f3b9ffef752eaab42c119 (patch) | |
| tree | 69631120102170a49e77f5eb5f38c21befa98bef /src/lib/libc | |
| parent | c10c5b524e3121f42c9239d737dd7f975638f378 (diff) | |
| download | openbsd-cdcdc3f000a66ef2634f3b9ffef752eaab42c119.tar.gz openbsd-cdcdc3f000a66ef2634f3b9ffef752eaab42c119.tar.bz2 openbsd-cdcdc3f000a66ef2634f3b9ffef752eaab42c119.zip | |
Add a few missing endbr64 to libcrypto
gcm_{gmult,ghash}_4bit(), aesni_ccm64_decrypt_blocks(), aes_cbc_encrypt(),
and aesni_xts_{en,de}crypt() were overlooked in previous passes.
Found with a diff for ld.lld by kettenis
ok kettenis
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/aes/asm/aesni-x86_64.pl | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/modes/asm/ghash-x86_64.pl | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/libcrypto/aes/asm/aesni-x86_64.pl b/src/lib/libcrypto/aes/asm/aesni-x86_64.pl index 43013a51fb..441524036a 100644 --- a/src/lib/libcrypto/aes/asm/aesni-x86_64.pl +++ b/src/lib/libcrypto/aes/asm/aesni-x86_64.pl | |||
| @@ -918,6 +918,7 @@ $code.=<<___; | |||
| 918 | .type aesni_ccm64_decrypt_blocks,\@function,6 | 918 | .type aesni_ccm64_decrypt_blocks,\@function,6 |
| 919 | .align 16 | 919 | .align 16 |
| 920 | aesni_ccm64_decrypt_blocks: | 920 | aesni_ccm64_decrypt_blocks: |
| 921 | _CET_ENDBR | ||
| 921 | ___ | 922 | ___ |
| 922 | $code.=<<___ if ($win64); | 923 | $code.=<<___ if ($win64); |
| 923 | lea -0x58(%rsp),%rsp | 924 | lea -0x58(%rsp),%rsp |
| @@ -1317,6 +1318,7 @@ $code.=<<___; | |||
| 1317 | .type aesni_xts_encrypt,\@function,6 | 1318 | .type aesni_xts_encrypt,\@function,6 |
| 1318 | .align 16 | 1319 | .align 16 |
| 1319 | aesni_xts_encrypt: | 1320 | aesni_xts_encrypt: |
| 1321 | _CET_ENDBR | ||
| 1320 | lea (%rsp),%rax | 1322 | lea (%rsp),%rax |
| 1321 | push %rbp | 1323 | push %rbp |
| 1322 | sub \$$frame_size,%rsp | 1324 | sub \$$frame_size,%rsp |
| @@ -1711,6 +1713,7 @@ $code.=<<___; | |||
| 1711 | .type aesni_xts_decrypt,\@function,6 | 1713 | .type aesni_xts_decrypt,\@function,6 |
| 1712 | .align 16 | 1714 | .align 16 |
| 1713 | aesni_xts_decrypt: | 1715 | aesni_xts_decrypt: |
| 1716 | _CET_ENDBR | ||
| 1714 | lea (%rsp),%rax | 1717 | lea (%rsp),%rax |
| 1715 | push %rbp | 1718 | push %rbp |
| 1716 | sub \$$frame_size,%rsp | 1719 | sub \$$frame_size,%rsp |
| @@ -2148,6 +2151,7 @@ $code.=<<___; | |||
| 2148 | .type ${PREFIX}_cbc_encrypt,\@function,6 | 2151 | .type ${PREFIX}_cbc_encrypt,\@function,6 |
| 2149 | .align 16 | 2152 | .align 16 |
| 2150 | ${PREFIX}_cbc_encrypt: | 2153 | ${PREFIX}_cbc_encrypt: |
| 2154 | _CET_ENDBR | ||
| 2151 | test $len,$len # check length | 2155 | test $len,$len # check length |
| 2152 | jz .Lcbc_ret | 2156 | jz .Lcbc_ret |
| 2153 | 2157 | ||
diff --git a/src/lib/libcrypto/modes/asm/ghash-x86_64.pl b/src/lib/libcrypto/modes/asm/ghash-x86_64.pl index f3caac15d6..bf547a041b 100644 --- a/src/lib/libcrypto/modes/asm/ghash-x86_64.pl +++ b/src/lib/libcrypto/modes/asm/ghash-x86_64.pl | |||
| @@ -165,6 +165,7 @@ $code=<<___; | |||
| 165 | .type gcm_gmult_4bit,\@function,2 | 165 | .type gcm_gmult_4bit,\@function,2 |
| 166 | .align 16 | 166 | .align 16 |
| 167 | gcm_gmult_4bit: | 167 | gcm_gmult_4bit: |
| 168 | _CET_ENDBR | ||
| 168 | push %rbx | 169 | push %rbx |
| 169 | push %rbp # %rbp and %r12 are pushed exclusively in | 170 | push %rbp # %rbp and %r12 are pushed exclusively in |
| 170 | push %r12 # order to reuse Win64 exception handler... | 171 | push %r12 # order to reuse Win64 exception handler... |
| @@ -195,6 +196,7 @@ $code.=<<___; | |||
| 195 | .type gcm_ghash_4bit,\@function,4 | 196 | .type gcm_ghash_4bit,\@function,4 |
| 196 | .align 16 | 197 | .align 16 |
| 197 | gcm_ghash_4bit: | 198 | gcm_ghash_4bit: |
| 199 | _CET_ENDBR | ||
| 198 | push %rbx | 200 | push %rbx |
| 199 | push %rbp | 201 | push %rbp |
| 200 | push %r12 | 202 | push %r12 |
