summaryrefslogtreecommitdiff
path: root/lib/libcrypto/rc4
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2023-04-25 04:42:27 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2023-04-25 04:42:27 +0000
commit58df9d669d3d7ca4e3d96aec565f39f2d421ed63 (patch)
tree0c7e25baf50f9e7be8f7fac6991861d63dfce089 /lib/libcrypto/rc4
parente5afc37d23dd33ecc94dd525498c7d86adad6ff4 (diff)
Add endbr64 where needed by inspection. Passes regresson tests.
ok jsing, and kind of tb an earlier version
Diffstat (limited to 'lib/libcrypto/rc4')
-rw-r--r--lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl3
-rwxr-xr-xlib/libcrypto/rc4/asm/rc4-x86_64.pl6
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl b/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl
index 501d9e936bb..6d058bd9d4b 100644
--- a/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl
+++ b/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl
@@ -109,6 +109,7 @@ $code.=<<___;
.globl $func
.type $func,\@function,$nargs
$func:
+ endbr64
cmp \$0,$len
je .Labort
push %rbx
@@ -453,6 +454,7 @@ $code.=<<___;
.type RC4_set_key,\@function,3
.align 16
RC4_set_key:
+ endbr64
lea 8($dat),$dat
lea ($inp,$len),$inp
neg $len
@@ -494,6 +496,7 @@ RC4_set_key:
.type RC4_options,\@abi-omnipotent
.align 16
RC4_options:
+ endbr64
lea .Lopts(%rip),%rax
ret
.align 64
diff --git a/lib/libcrypto/rc4/asm/rc4-x86_64.pl b/lib/libcrypto/rc4/asm/rc4-x86_64.pl
index 8de869489f6..2bac7d744dd 100755
--- a/lib/libcrypto/rc4/asm/rc4-x86_64.pl
+++ b/lib/libcrypto/rc4/asm/rc4-x86_64.pl
@@ -127,7 +127,9 @@ $code=<<___;
.globl RC4
.type RC4,\@function,4
.align 16
-RC4: or $len,$len
+RC4:
+ endbr64
+ or $len,$len
jne .Lentry
ret
.Lentry:
@@ -433,6 +435,7 @@ $code.=<<___;
.type RC4_set_key,\@function,3
.align 16
RC4_set_key:
+ endbr64
lea 8($dat),$dat
lea ($inp,$len),$inp
neg $len
@@ -505,6 +508,7 @@ RC4_set_key:
.type RC4_options,\@abi-omnipotent
.align 16
RC4_options:
+ endbr64
lea .Lopts(%rip),%rax
mov OPENSSL_ia32cap_P(%rip),%edx
bt \$IA32CAP_BIT0_INTELP4,%edx