summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-12-19 22:26:39 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-06 10:13:55 +0000
commitb253d9b3273dfe29e4d83cecd6459034bb9cada4 (patch)
treeb881cf1e893f2d1f0afb450feacdb4ad7d6245ae /meta/recipes-connectivity
parent475c77014fa729d4cf951f35cf365e0e51879b1f (diff)
downloadpoky-b253d9b3273dfe29e4d83cecd6459034bb9cada4.tar.gz
openssl: fix runtime errors with Thumb2 when using binutils 2.29
When compiling OpenSSL with binutils 2.29 for ARM with Thumb2 enabled crashes and unexpected behavior occurs. E.g. connecting to a OpenSSH server using the affected binary fails with: ssh_dispatch_run_fatal: Connection to 192.168.10.171 port 22: incorrect signature Backport upstream bugfix: https://github.com/openssl/openssl/issues/4659 (From OE-Core rev: 0dba9ac4414a31e341840da3cca12a9ec0658abe) Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/openssl/openssl/0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch88
-rw-r--r--meta/recipes-connectivity/openssl/openssl_1.1.0g.bb1
2 files changed, 89 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch b/meta/recipes-connectivity/openssl/openssl/0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch
new file mode 100644
index 0000000000..bb0a1689ed
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch
@@ -0,0 +1,88 @@
1From bcc096a50811bf0f0c4fd34b2993fed7a7015972 Mon Sep 17 00:00:00 2001
2From: Andy Polyakov <appro@openssl.org>
3Date: Fri, 3 Nov 2017 23:30:01 +0100
4Subject: [PATCH] aes/asm/{aes-armv4|bsaes-armv7}.pl: make it work with
5 binutils-2.29.
6
7It's not clear if it's a feature or bug, but binutils-2.29[.1]
8interprets 'adr' instruction with Thumb2 code reference differently,
9in a way that affects calculation of addresses of constants' tables.
10
11Upstream-Status: Backport
12
13Reviewed-by: Tim Hudson <tjh@openssl.org>
14Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
15Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
16(Merged from https://github.com/openssl/openssl/pull/4669)
17
18(cherry picked from commit b82acc3c1a7f304c9df31841753a0fa76b5b3cda)
19---
20 crypto/aes/asm/aes-armv4.pl | 6 +++---
21 crypto/aes/asm/bsaes-armv7.pl | 6 +++---
22 2 files changed, 6 insertions(+), 6 deletions(-)
23
24diff --git a/crypto/aes/asm/aes-armv4.pl b/crypto/aes/asm/aes-armv4.pl
25index 16d79aae53..c6474b8aad 100644
26--- a/crypto/aes/asm/aes-armv4.pl
27+++ b/crypto/aes/asm/aes-armv4.pl
28@@ -200,7 +200,7 @@ AES_encrypt:
29 #ifndef __thumb2__
30 sub r3,pc,#8 @ AES_encrypt
31 #else
32- adr r3,AES_encrypt
33+ adr r3,.
34 #endif
35 stmdb sp!,{r1,r4-r12,lr}
36 #ifdef __APPLE__
37@@ -450,7 +450,7 @@ _armv4_AES_set_encrypt_key:
38 #ifndef __thumb2__
39 sub r3,pc,#8 @ AES_set_encrypt_key
40 #else
41- adr r3,AES_set_encrypt_key
42+ adr r3,.
43 #endif
44 teq r0,#0
45 #ifdef __thumb2__
46@@ -976,7 +976,7 @@ AES_decrypt:
47 #ifndef __thumb2__
48 sub r3,pc,#8 @ AES_decrypt
49 #else
50- adr r3,AES_decrypt
51+ adr r3,.
52 #endif
53 stmdb sp!,{r1,r4-r12,lr}
54 #ifdef __APPLE__
55diff --git a/crypto/aes/asm/bsaes-armv7.pl b/crypto/aes/asm/bsaes-armv7.pl
56index 9f288660ef..a27bb4a179 100644
57--- a/crypto/aes/asm/bsaes-armv7.pl
58+++ b/crypto/aes/asm/bsaes-armv7.pl
59@@ -744,7 +744,7 @@ $code.=<<___;
60 .type _bsaes_decrypt8,%function
61 .align 4
62 _bsaes_decrypt8:
63- adr $const,_bsaes_decrypt8
64+ adr $const,.
65 vldmia $key!, {@XMM[9]} @ round 0 key
66 #ifdef __APPLE__
67 adr $const,.LM0ISR
68@@ -843,7 +843,7 @@ _bsaes_const:
69 .type _bsaes_encrypt8,%function
70 .align 4
71 _bsaes_encrypt8:
72- adr $const,_bsaes_encrypt8
73+ adr $const,.
74 vldmia $key!, {@XMM[9]} @ round 0 key
75 #ifdef __APPLE__
76 adr $const,.LM0SR
77@@ -951,7 +951,7 @@ $code.=<<___;
78 .type _bsaes_key_convert,%function
79 .align 4
80 _bsaes_key_convert:
81- adr $const,_bsaes_key_convert
82+ adr $const,.
83 vld1.8 {@XMM[7]}, [$inp]! @ load round 0 key
84 #ifdef __APPLE__
85 adr $const,.LM0
86--
872.15.0
88
diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.0g.bb b/meta/recipes-connectivity/openssl/openssl_1.1.0g.bb
index 5f3e9a9dfa..1649bffaa1 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.0g.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.0g.bb
@@ -18,6 +18,7 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
18 file://openssl-c_rehash.sh \ 18 file://openssl-c_rehash.sh \
19 file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \ 19 file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \
20 file://0001-Remove-test-that-requires-running-as-non-root.patch \ 20 file://0001-Remove-test-that-requires-running-as-non-root.patch \
21 file://0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch \
21 " 22 "
22 23
23S = "${WORKDIR}/openssl-${PV}" 24S = "${WORKDIR}/openssl-${PV}"