From 58df9d669d3d7ca4e3d96aec565f39f2d421ed63 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 25 Apr 2023 04:42:27 +0000 Subject: Add endbr64 where needed by inspection. Passes regresson tests. ok jsing, and kind of tb an earlier version --- lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl | 3 +++ lib/libcrypto/rc4/asm/rc4-x86_64.pl | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/libcrypto/rc4') 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 -- cgit v1.2.3