summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rc4/asm
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/rc4/asm
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/rc4/asm')
-rw-r--r--src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl4
-rwxr-xr-xsrc/lib/libcrypto/rc4/asm/rc4-x86_64.pl4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl b/src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl
index 3190e6a8e7..e5e8aa08a1 100644
--- a/src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl
+++ b/src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl
@@ -109,7 +109,7 @@ $code.=<<___;
109.globl $func 109.globl $func
110.type $func,\@function,$nargs 110.type $func,\@function,$nargs
111$func: 111$func:
112 endbr64 112 _CET_ENDBR
113 cmp \$0,$len 113 cmp \$0,$len
114 je .Labort 114 je .Labort
115 push %rbx 115 push %rbx
@@ -454,7 +454,7 @@ $code.=<<___;
454.type RC4_set_key,\@function,3 454.type RC4_set_key,\@function,3
455.align 16 455.align 16
456RC4_set_key: 456RC4_set_key:
457 endbr64 457 _CET_ENDBR
458 lea 8($dat),$dat 458 lea 8($dat),$dat
459 lea ($inp,$len),$inp 459 lea ($inp,$len),$inp
460 neg $len 460 neg $len
diff --git a/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl b/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl
index 0472acce8a..a9cf9d1bdf 100755
--- a/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl
+++ b/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl
@@ -128,7 +128,7 @@ $code=<<___;
128.type RC4,\@function,4 128.type RC4,\@function,4
129.align 16 129.align 16
130RC4: 130RC4:
131 endbr64 131 _CET_ENDBR
132 or $len,$len 132 or $len,$len
133 jne .Lentry 133 jne .Lentry
134 ret 134 ret
@@ -435,7 +435,7 @@ $code.=<<___;
435.type RC4_set_key,\@function,3 435.type RC4_set_key,\@function,3
436.align 16 436.align 16
437RC4_set_key: 437RC4_set_key:
438 endbr64 438 _CET_ENDBR
439 lea 8($dat),$dat 439 lea 8($dat),$dat
440 lea ($inp,$len),$inp 440 lea ($inp,$len),$inp
441 neg $len 441 neg $len