summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/sha
diff options
context:
space:
mode:
authortb <>2024-02-24 15:30:14 +0000
committertb <>2024-02-24 15:30:14 +0000
commitc10c5b524e3121f42c9239d737dd7f975638f378 (patch)
tree162dfb371639bf1514d472f64e2a4d1279851907 /src/lib/libcrypto/sha
parent1f31ec76cd83a26559f7a7ee2623bce8b503473d (diff)
downloadopenbsd-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/sha')
-rwxr-xr-xsrc/lib/libcrypto/sha/asm/sha1-x86_64.pl8
-rwxr-xr-xsrc/lib/libcrypto/sha/asm/sha512-x86_64.pl2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/sha/asm/sha1-x86_64.pl b/src/lib/libcrypto/sha/asm/sha1-x86_64.pl
index e15ff47f88..e080251df4 100755
--- a/src/lib/libcrypto/sha/asm/sha1-x86_64.pl
+++ b/src/lib/libcrypto/sha/asm/sha1-x86_64.pl
@@ -222,7 +222,7 @@ $code.=<<___;
222.type sha1_block_data_order,\@function,3 222.type sha1_block_data_order,\@function,3
223.align 16 223.align 16
224sha1_block_data_order: 224sha1_block_data_order:
225 endbr64 225 _CET_ENDBR
226 mov OPENSSL_ia32cap_P+0(%rip),%r9d 226 mov OPENSSL_ia32cap_P+0(%rip),%r9d
227 mov OPENSSL_ia32cap_P+4(%rip),%r8d 227 mov OPENSSL_ia32cap_P+4(%rip),%r8d
228 test \$IA32CAP_MASK1_SSSE3,%r8d # check SSSE3 bit 228 test \$IA32CAP_MASK1_SSSE3,%r8d # check SSSE3 bit
@@ -310,7 +310,7 @@ $code.=<<___;
310.align 16 310.align 16
311sha1_block_data_order_ssse3: 311sha1_block_data_order_ssse3:
312_ssse3_shortcut: 312_ssse3_shortcut:
313 endbr64 313 _CET_ENDBR
314 push %rbx 314 push %rbx
315 push %rbp 315 push %rbp
316 push %r12 316 push %r12
@@ -731,7 +731,7 @@ $code.=<<___;
731.align 16 731.align 16
732sha1_block_data_order_avx: 732sha1_block_data_order_avx:
733_avx_shortcut: 733_avx_shortcut:
734 endbr64 734 _CET_ENDBR
735 push %rbx 735 push %rbx
736 push %rbp 736 push %rbp
737 push %r12 737 push %r12
@@ -1102,7 +1102,7 @@ $code.=<<___;
1102.type se_handler,\@abi-omnipotent 1102.type se_handler,\@abi-omnipotent
1103.align 16 1103.align 16
1104se_handler: 1104se_handler:
1105 endbr64 1105 _CET_ENDBR
1106 push %rsi 1106 push %rsi
1107 push %rdi 1107 push %rdi
1108 push %rbx 1108 push %rbx
diff --git a/src/lib/libcrypto/sha/asm/sha512-x86_64.pl b/src/lib/libcrypto/sha/asm/sha512-x86_64.pl
index 120693feeb..f7a4dad2c9 100755
--- a/src/lib/libcrypto/sha/asm/sha512-x86_64.pl
+++ b/src/lib/libcrypto/sha/asm/sha512-x86_64.pl
@@ -175,7 +175,7 @@ $code=<<___;
175.type $func,\@function,4 175.type $func,\@function,4
176.align 16 176.align 16
177$func: 177$func:
178 endbr64 178 _CET_ENDBR
179 push %rbx 179 push %rbx
180 push %rbp 180 push %rbp
181 push %r12 181 push %r12