Don't set NEON_FUNCTIONAL in the getauxval path. NEON_FUNCTIONAL is set by default in crypto.c. Chromium calls |CRYPTO_set_NEON_functional| before |SSL_library_init| and thus the getauxval path for CPU-feature detection was resetting the functional flag, even on broken processors. This change means that, apart from the default, only |CRYPTO_set_NEON_functional| will change the NEON_FUNCTIONAL flag. BUG=469511 Change-Id: I3d4dbbd9f4a5e33539f8559f90289e706ad17451 Reviewed-on: https://boringssl-review.googlesource.com/4170 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/cpu-arm.c b/crypto/cpu-arm.c index 8ca60fb..325cd22 100644 --- a/crypto/cpu-arm.c +++ b/crypto/cpu-arm.c
@@ -168,7 +168,7 @@ } #endif - OPENSSL_armcap_P |= ARMV7_NEON | ARMV7_NEON_FUNCTIONAL; + OPENSSL_armcap_P |= ARMV7_NEON; if (hwcap & kAES) { OPENSSL_armcap_P |= ARMV8_AES;