summaryrefslogtreecommitdiff
path: root/crypto/armcap.c
diff options
context:
space:
mode:
authorCameron Gutman <aicommander@gmail.com>2022-07-22 21:04:46 -0500
committerHugo Landau <hlandau@openssl.org>2022-10-04 11:56:47 +0100
commitf2ec24c9e7c3df55fba97336594a5e815c342b01 (patch)
treeb454f9a12ebd6f3c239ee61eee4ea07ba0b75c9c /crypto/armcap.c
parenta1de5eb88479515535e5de090ded800455c3d4a7 (diff)
downloadopenssl-new-f2ec24c9e7c3df55fba97336594a5e815c342b01.tar.gz
armcap: skip probing _armv7_tick()
Detection of this feature is unreliable so only use it if requested. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18852)
Diffstat (limited to 'crypto/armcap.c')
-rw-r--r--crypto/armcap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/armcap.c b/crypto/armcap.c
index 7e6cd8fe90..0aa11baed4 100644
--- a/crypto/armcap.c
+++ b/crypto/armcap.c
@@ -357,11 +357,11 @@ void OPENSSL_cpuid_setup(void)
# endif
# endif
- /* Things that getauxval didn't tell us */
- if (sigsetjmp(ill_jmp, 1) == 0) {
- _armv7_tick();
- OPENSSL_armcap_P |= ARMV7_TICK;
- }
+ /*
+ * Probing for ARMV7_TICK is known to produce unreliable results,
+ * so we will only use the feature when the user explicitly enables
+ * it with OPENSSL_armcap.
+ */
sigaction(SIGILL, &ill_oact, NULL);
sigprocmask(SIG_SETMASK, &oset, NULL);