[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Andy Polyakov appro at openssl.org
Wed Feb 15 22:17:40 UTC 2017


The branch OpenSSL_1_1_0-stable has been updated
       via  b763981b76b6a97c72011c290ec574b37a15f6e4 (commit)
       via  c04b1434e6741cfc6b6c29db2c34b46f5ccd3d99 (commit)
      from  c9c1a63d58c7950484347d153a2150b4587e7a53 (commit)


- Log -----------------------------------------------------------------
commit b763981b76b6a97c72011c290ec574b37a15f6e4
Author: Andy Polyakov <appro at openssl.org>
Date:   Wed Feb 15 12:01:09 2017 +0100

    crypto/armcap.c: short-circuit processor capability probe in iOS builds.
    
    Capability probing by catching SIGILL appears to be problematic
    on iOS. But since Apple universe is "monocultural", it's actually
    possible to simply set pre-defined processor capability mask.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2617)
    
    (cherry picked from commit 8653e78f4319b23d60239f9557d8c1e1d23be1a5)

commit c04b1434e6741cfc6b6c29db2c34b46f5ccd3d99
Author: Andy Polyakov <appro at openssl.org>
Date:   Mon Feb 13 18:16:16 2017 +0100

    ARMv4 assembly pack: harmonize Thumb-ification of iOS build.
    
    Three modules were left behind in a285992763f3961f69a8d86bf7dfff020a08cef9.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2617)
    
    (cherry picked from commit c93f06c12f10c07cea935abd78a07a037e27f155)

-----------------------------------------------------------------------

Summary of changes:
 crypto/aes/asm/aesv8-armx.pl     |  9 ++++++---
 crypto/armcap.c                  | 18 ++++++++++++++++++
 crypto/armv4cpuid.pl             |  1 +
 crypto/modes/asm/ghashv8-armx.pl |  6 +++++-
 4 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/crypto/aes/asm/aesv8-armx.pl b/crypto/aes/asm/aesv8-armx.pl
index 9246dbb..1782d5b 100755
--- a/crypto/aes/asm/aesv8-armx.pl
+++ b/crypto/aes/asm/aesv8-armx.pl
@@ -59,9 +59,12 @@ $code=<<___;
 .text
 ___
 $code.=".arch	armv8-a+crypto\n"			if ($flavour =~ /64/);
-$code.=".arch	armv7-a\n.fpu	neon\n.code	32\n"	if ($flavour !~ /64/);
-		#^^^^^^ this is done to simplify adoption by not depending
-		#	on latest binutils.
+$code.=<<___						if ($flavour !~ /64/);
+.arch	armv7-a	// don't confuse not-so-latest binutils with argv8 :-)
+.fpu	neon
+.code	32
+#undef	__thumb2__
+___
 
 # Assembler mnemonics are an eclectic mix of 32- and 64-bit syntax,
 # NEON is mostly 32-bit mnemonics, integer - mostly 64. Goal is to
diff --git a/crypto/armcap.c b/crypto/armcap.c
index 4215766..2953484 100644
--- a/crypto/armcap.c
+++ b/crypto/armcap.c
@@ -111,6 +111,24 @@ void OPENSSL_cpuid_setup(void)
         return;
     }
 
+# if defined(__APPLE__) && !defined(__aarch64__)
+    /*
+     * Capability probing by catching SIGILL appears to be problematic
+     * on iOS. But since Apple universe is "monocultural", it's actually
+     * possible to simply set pre-defined processor capability mask.
+     */
+    if (1) {
+        OPENSSL_armcap_P = ARMV7_NEON;
+        return;
+    }
+    /*
+     * One could do same even for __aarch64__ iOS builds. It's not done
+     * exclusively for reasons of keeping code unified across platforms.
+     * Unified code works because it never triggers SIGILL on Apple
+     * devices...
+     */
+# endif
+
     sigfillset(&all_masked);
     sigdelset(&all_masked, SIGILL);
     sigdelset(&all_masked, SIGTRAP);
diff --git a/crypto/armv4cpuid.pl b/crypto/armv4cpuid.pl
index 33c893d..f7d31a6 100644
--- a/crypto/armv4cpuid.pl
+++ b/crypto/armv4cpuid.pl
@@ -27,6 +27,7 @@ $code.=<<___;
 .thumb
 #else
 .code	32
+#undef	__thumb2__
 #endif
 
 .align	5
diff --git a/crypto/modes/asm/ghashv8-armx.pl b/crypto/modes/asm/ghashv8-armx.pl
index cb4537b..dcd5f59 100644
--- a/crypto/modes/asm/ghashv8-armx.pl
+++ b/crypto/modes/asm/ghashv8-armx.pl
@@ -67,7 +67,11 @@ $code=<<___;
 .text
 ___
 $code.=".arch	armv8-a+crypto\n"	if ($flavour =~ /64/);
-$code.=".fpu	neon\n.code	32\n"	if ($flavour !~ /64/);
+$code.=<<___				if ($flavour !~ /64/);
+.fpu	neon
+.code	32
+#undef	__thumb2__
+___
 
 ################################################################################
 # void gcm_init_v8(u128 Htable[16],const u64 H[2]);


More information about the openssl-commits mailing list