[openssl] OpenSSL_1_1_1-stable update

Matt Caswell matt at openssl.org
Thu Jan 14 08:38:28 UTC 2021


The branch OpenSSL_1_1_1-stable has been updated
       via  dfe07182aac02b962a5a72d86cab69e59e90aeca (commit)
      from  fc4ca443c7b999bb47bec6b8ea828973e3c4c7e1 (commit)


- Log -----------------------------------------------------------------
commit dfe07182aac02b962a5a72d86cab69e59e90aeca
Author: David Carlier <devnexen at gmail.com>
Date:   Wed Dec 9 20:23:32 2020 +0000

    OPENSSL_cpuid_setup FreeBSD arm update.
    
    when possible using the getauxval equivalent which has similar ids as Linux, instead of bad instructions catch approach.
    
    Reviewed-by: Ben Kaduk <kaduk at mit.edu>
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/13650)
    
    (cherry picked from commit 5eb24fbd1c3e0d130ba7f81f1ccf457a2b9d75ad)

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

Summary of changes:
 crypto/armcap.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/crypto/armcap.c b/crypto/armcap.c
index 58e54f0da2..53c2855883 100644
--- a/crypto/armcap.c
+++ b/crypto/armcap.c
@@ -69,6 +69,23 @@ void OPENSSL_cpuid_setup(void) __attribute__ ((constructor));
 #   define OSSL_IMPLEMENT_GETAUXVAL
 #  endif
 # endif
+# if defined(__FreeBSD__)
+#  include <sys/param.h>
+#  if __FreeBSD_version >= 1200000
+#   include <sys/auxv.h>
+#   define OSSL_IMPLEMENT_GETAUXVAL
+
+static unsigned long getauxval(unsigned long key)
+{
+  unsigned long val = 0ul;
+
+  if (elf_aux_info((int)key, &val, sizeof(val)) != 0)
+    return 0ul;
+
+  return val;
+}
+#  endif
+# endif
 
 /*
  * ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas


More information about the openssl-commits mailing list