public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Kyle McMartin <kmcmarti@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/openssl] rebase_40beta: arm: use auxv to figure out armcap.c instead of using signals (#1006474)
Date: Tue, 09 Jun 2026 12:42:58 GMT [thread overview]
Message-ID: <178100897899.1.10879465916105256662.rpms-openssl-f6aa3c2dddd7@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/openssl
Branch : rebase_40beta
Commit : f6aa3c2dddd757f3dbf5ce9cf9b50cd5477d2301
Author : Kyle McMartin <kmcmarti@redhat.com>
Date : 2013-09-11T09:52:25-04:00
Stats : +100/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/openssl/c/f6aa3c2dddd757f3dbf5ce9cf9b50cd5477d2301?branch=rebase_40beta
Log:
arm: use auxv to figure out armcap.c instead of using signals (#1006474)
---
diff --git a/openssl-1.0.1e-arm-use-elf-auxv-caps.patch b/openssl-1.0.1e-arm-use-elf-auxv-caps.patch
new file mode 100644
index 0000000..94a8c42
--- /dev/null
+++ b/openssl-1.0.1e-arm-use-elf-auxv-caps.patch
@@ -0,0 +1,93 @@
+diff --git a/crypto/armcap.c b/crypto/armcap.c
+index 5258d2f..efb4009 100644
+--- a/crypto/armcap.c
++++ b/crypto/armcap.c
+@@ -9,11 +9,6 @@
+
+ unsigned int OPENSSL_armcap_P;
+
+-static sigset_t all_masked;
+-
+-static sigjmp_buf ill_jmp;
+-static void ill_handler (int sig) { siglongjmp(ill_jmp,sig); }
+-
+ /*
+ * Following subroutines could have been inlined, but it's not all
+ * ARM compilers support inline assembler...
+@@ -29,24 +24,26 @@ unsigned int OPENSSL_rdtsc(void)
+ return 0;
+ }
+
+-#if defined(__GNUC__) && __GNUC__>=2
+-void OPENSSL_cpuid_setup(void) __attribute__((constructor));
+-#endif
+-void OPENSSL_cpuid_setup(void)
++#if defined(__GLIBC__) && __GLIBC__>=2 && __GLIBC_MINOR__>=16
++#include <sys/auxv.h>
++
++void OPENSSL_cpuid_find(void)
++ {
++ unsigned long hwcap = getauxval(AT_HWCAP);
++ char *plat = (char *)getauxval(AT_PLATFORM);
++
++ OPENSSL_armcap_P |= hwcap & HWCAP_ARM_NEON ? ARMV7_NEON : 0;
++ OPENSSL_armcap_P |= plat ? (plat[1] == '7' ? ARMV7_TICK : 0) : 0;
++ }
++#else
++static sigset_t all_masked;
++static sigjmp_buf ill_jmp;
++static void ill_handler (int sig) { siglongjmp(ill_jmp,sig); }
++
++void OPENSSL_cpuid_find(void)
+ {
+- char *e;
+ struct sigaction ill_oact,ill_act;
+ sigset_t oset;
+- static int trigger=0;
+-
+- if (trigger) return;
+- trigger=1;
+-
+- if ((e=getenv("OPENSSL_armcap")))
+- {
+- OPENSSL_armcap_P=strtoul(e,NULL,0);
+- return;
+- }
+
+ sigfillset(&all_masked);
+ sigdelset(&all_masked,SIGILL);
+@@ -55,8 +52,6 @@ void OPENSSL_cpuid_setup(void)
+ sigdelset(&all_masked,SIGBUS);
+ sigdelset(&all_masked,SIGSEGV);
+
+- OPENSSL_armcap_P = 0;
+-
+ memset(&ill_act,0,sizeof(ill_act));
+ ill_act.sa_handler = ill_handler;
+ ill_act.sa_mask = all_masked;
+@@ -78,3 +73,25 @@ void OPENSSL_cpuid_setup(void)
+ sigaction (SIGILL,&ill_oact,NULL);
+ sigprocmask(SIG_SETMASK,&oset,NULL);
+ }
++#endif
++
++#if defined(__GNUC__) && __GNUC__>=2
++void OPENSSL_cpuid_setup(void) __attribute__((constructor));
++#endif
++void OPENSSL_cpuid_setup(void)
++ {
++ char *e;
++ static int trigger=0;
++
++ if (trigger) return;
++ trigger=1;
++
++ if ((e=getenv("OPENSSL_armcap")))
++ {
++ OPENSSL_armcap_P=strtoul(e,NULL,0);
++ return;
++ }
++
++ OPENSSL_armcap_P = 0;
++ OPENSSL_cpuid_find();
++ }
diff --git a/openssl.spec b/openssl.spec
index cf908ed..bb264ab 100644
--- a/openssl.spec
+++ b/openssl.spec
@@ -21,7 +21,7 @@
Summary: Utilities from the general purpose cryptography library with TLS implementation
Name: openssl
Version: 1.0.1e
-Release: 19%{?dist}
+Release: 20%{?dist}
Epoch: 1
# We have to remove certain patented algorithms from the openssl source
# tarball with the hobble-openssl script which is included below.
@@ -76,6 +76,7 @@ Patch81: openssl-1.0.1-beta2-padlock64.patch
Patch82: openssl-1.0.1e-backports.patch
Patch83: openssl-1.0.1e-bad-mac.patch
Patch84: openssl-1.0.1e-trusted-first.patch
+Patch85: openssl-1.0.1e-arm-use-elf-auxv-caps.patch
License: OpenSSL
Group: System Environment/Libraries
@@ -193,6 +194,7 @@ OpenSSL FIPS module.
%patch72 -p1 -b .fips-ctor
%patch83 -p1 -b .bad-mac
%patch84 -p1 -b .trusted-first
+%patch85 -p1 -b .armcap
sed -i 's/SHLIB_VERSION_NUMBER "1.0.0"/SHLIB_VERSION_NUMBER "%{version}"/' crypto/opensslv.h
@@ -468,6 +470,10 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/fipscanister.*
prelink -u %{_libdir}/libcrypto.so.%{version} %{_libdir}/libssl.so.%{version} 2>/dev/null || :
%changelog
+* Tue Sep 10 2013 Kyle McMartin <kyle@redhat.com> 1.0.1e-20
+- [arm] use elf auxv to figure out armcap.c instead of playing silly
+ games with SIGILL handlers. (#1006474)
+
* Mon Sep 2 2013 Tomas Mraz <tmraz@redhat.com> 1.0.1e-19
- use version-release in .hmac suffix to avoid overwrite
during upgrade
next reply other threads:[~2026-06-09 12:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 12:42 Kyle McMartin [this message]
2026-06-09 12:42 [rpms/openssl] rebase_40beta: arm: use auxv to figure out armcap.c instead of using signals (#1006474) Kyle McMartin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178100897899.1.10879465916105256662.rpms-openssl-f6aa3c2dddd7@fedoraproject.org \
--to=kmcmarti@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox