diff --git a/openssl-1.1.1k-sw8a.patch b/openssl-1.1.1k-sw8a.patch new file mode 100644 index 0000000000000000000000000000000000000000..853432501910a7e6c89dba0c1ef8576634d73de4 --- /dev/null +++ b/openssl-1.1.1k-sw8a.patch @@ -0,0 +1,75 @@ +diff -uNar openssl-1.1.1k.org/crypto/sw_64cpuid.pl openssl-1.1.1k.new/crypto/sw_64cpuid.pl +--- openssl-1.1.1k.org/crypto/sw_64cpuid.pl 2024-04-17 13:38:06.816189674 +0800 ++++ openssl-1.1.1k.new/crypto/sw_64cpuid.pl 2024-04-17 13:43:27.463962124 +0800 +@@ -83,11 +83,8 @@ + .prologue 0 + 1: ldi $2,0($16) + lldw $0,0($2) +- ldi $3,1 +- rd_f $3 + addw $0,$17,$1 + lstw $1,0($2) +- rd_f $1 + beq $1,1b + addw $0,$17,$0 + ret ($26) +@@ -172,7 +169,6 @@ + my ($tick,$lasttick)=("\$19","\$20"); + my ($diff,$lastdiff)=("\$21","\$22"); + my ($v0,$ra,$sp,$zero)=("\$0","\$26","\$30","\$31"); +-my ($tmp)=("\$4"); + + print <<___; + .globl OPENSSL_instrument_bus +@@ -186,12 +182,9 @@ + mov 0,$diff + + lldw $tick,0($out) +- ldi $tmp,1 +- wr_f $tmp + addw $diff,$tick,$tick + mov $tick,$diff + lstw $tick,0($out) +- rd_f $tick + stl $diff,0($out) + + .Loop: rtc $tick +@@ -199,12 +192,9 @@ + mov $tick,$lasttick + + lldw $tick,0($out) +- ldi $tmp,1 +- wr_f $tmp + addw $diff,$tick,$tick + mov $tick,$diff + lstw $tick,0($out) +- rd_f $tick + stl $diff,0($out) + + subw $cnt,1,$cnt +@@ -225,12 +215,9 @@ + mov 0,$diff + + lldw $tick,0($out) +- ldi $tmp,1 +- wr_f $tmp + addw $diff,$tick,$tick + mov $tick,$diff + lstw $tick,0($out) +- rd_f $tick + stl $diff,0($out) + + rtc $tick +@@ -239,12 +226,9 @@ + mov $diff,$lastdiff + .Loop2: + lldw $tick,0($out) +- ldi $tmp,1 +- wr_f $tmp + addw $diff,$tick,$tick + mov $tick,$diff + lstw $tick,0($out) +- rd_f $tick + stl $diff,0($out) + + subw $max,1,$max diff --git a/openssl.spec b/openssl.spec index b7e1faacd3d1316b02d2a2fe2f214b61b58fa87f..53d3c0c920c09d11678e24bcba7cfff0ffd2ba02 100644 --- a/openssl.spec +++ b/openssl.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.4 +%define anolis_release .0.5 # For the curious: # 0.9.5a soversion = 0 # 0.9.6 soversion = 1 @@ -99,6 +99,7 @@ Patch107: openssl-1.1.1-cve-2023-5678.patch # SM2 distid for sign and verify Patch1000: openssl-1.1.1-sm2-sign-verify.patch Patch1001: openssl-1.1.1k-sw.patch +Patch1002: openssl-1.1.1k-sw8a.patch License: OpenSSL and ASL 2.0 URL: http://www.openssl.org/ @@ -233,6 +234,7 @@ cp %{SOURCE13} test/ %patch107 -p1 -b .cve-2023-5678 %patch1000 -p1 -b .sm2-sign-verify %patch1001 -p1 +%patch1002 -p1 %build # Figure out which flags we want to use. @@ -525,6 +527,9 @@ export LD_LIBRARY_PATH %postun libs -p /sbin/ldconfig %changelog +* Wed Apr 17 2024 wxiat - 1:1.1.1k-12.0.5 +- delete wr_f and rd_f in sw_64cpuid.pl + * Wed Mar 20 2024 wxiat - 1:1.1.1k-12.0.4 - add sw arch in opensslconf.h