Skip to content

Commit e322bad

Browse files
committed
openssl/3.4: fix xonly issue on ARM Cortex-A53 (rpi3)
found & tested with openssl 3.3.3 by sthen
1 parent 24b5124 commit e322bad

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

security/openssl/3.4/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ PKGNAME= openssl-${V}
99
PKGSPEC= openssl->=3.4v0,<3.5v0
1010
EPOCH= 0
1111

12+
REVISION= 0
13+
1214
SHLIBVER= 32.0
1315
SHARED_LIBS= crypto ${SHLIBVER} \
1416
ssl ${SHLIBVER}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
Index: crypto/aes/asm/bsaes-armv8.pl
2+
--- crypto/aes/asm/bsaes-armv8.pl.orig
3+
+++ crypto/aes/asm/bsaes-armv8.pl
4+
@@ -78,7 +78,8 @@ __END__
5+
// other SIMD registers corrupted
6+
_bsaes_decrypt8:
7+
ldr q8, [x9], #16
8+
- adr x11, .LM0ISR
9+
+ adrp x11, .LM0ISR
10+
+ add x11, x11, :lo12:.LM0ISR
11+
movi v9.16b, #0x55
12+
ldr q10, [x11], #16
13+
movi v16.16b, #0x33
14+
@@ -494,6 +495,7 @@ _bsaes_decrypt8:
15+
ret
16+
.size _bsaes_decrypt8,.-_bsaes_decrypt8
17+
18+
+.rodata
19+
.type _bsaes_const,%object
20+
.align 6
21+
_bsaes_const:
22+
@@ -533,6 +535,7 @@ _bsaes_const:
23+
24+
.align 6
25+
.size _bsaes_const,.-_bsaes_const
26+
+.previous
27+
28+
.type _bsaes_encrypt8,%function
29+
.align 4
30+
@@ -548,7 +551,8 @@ _bsaes_const:
31+
// other SIMD registers corrupted
32+
_bsaes_encrypt8:
33+
ldr q8, [x9], #16
34+
- adr x11, .LM0SR
35+
+ adrp x11, .LM0SR
36+
+ add x11, x11, :lo12:.LM0SR
37+
ldr q9, [x11], #16
38+
_bsaes_encrypt8_alt:
39+
eor v0.16b, v0.16b, v8.16b
40+
@@ -952,9 +956,11 @@ _bsaes_encrypt8_alt:
41+
// other SIMD registers corrupted
42+
_bsaes_key_convert:
43+
#ifdef __AARCH64EL__
44+
- adr x11, .LM0_littleendian
45+
+ adrp x11, .LM0_littleendian
46+
+ add x11, x11, :lo12:.LM0_littleendian
47+
#else
48+
- adr x11, .LM0_bigendian
49+
+ adrp x11, .LM0_bigendian
50+
+ add x11, x11, :lo12:.LM0_bigendian
51+
#endif
52+
ldr q0, [x9], #16 // load round 0 key
53+
ldr q1, [x11] // .LM0
54+
@@ -998,7 +1004,8 @@ _bsaes_key_convert:
55+
// don't save last round key
56+
#ifdef __AARCH64EL__
57+
rev32 v15.16b, v15.16b
58+
- adr x11, .LM0_bigendian
59+
+ adrp x11, .LM0_bigendian
60+
+ add x11, x11, :lo12:.LM0_bigendian
61+
#endif
62+
ret
63+
.size _bsaes_key_convert,.-_bsaes_key_convert

0 commit comments

Comments
 (0)