diff options
author | noel <noel@chromium.org> | 2015-02-03 01:55:27 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-03 09:57:23 +0000 |
commit | 02f7bf1302c3e613b887fbb3f46dd54f5f5888d3 (patch) | |
tree | 8c2d5863519a53646f09ed6c4195653b5bbdb3c1 /crypto | |
parent | 6e808d162ba5979f3e7981c8ef7b11d621e1bfdb (diff) | |
download | chromium_src-02f7bf1302c3e613b887fbb3f46dd54f5f5888d3.zip chromium_src-02f7bf1302c3e613b887fbb3f46dd54f5f5888d3.tar.gz chromium_src-02f7bf1302c3e613b887fbb3f46dd54f5f5888d3.tar.bz2 |
Revert of Move the call to CRYPTO_set_NEON_capable up. (patchset #1 id:1 of https://codereview.chromium.org/899463002/)
Reason for revert:
Suspect this change upset the webkit ChromeOS Test 1, Mac 10.8, encrypted
media tests. Reverting to see if these builders turn green.
http://build.chromium.org/p/chromium.webkit/builders/Linux%20ChromiumOS%20Tests%20%281%29/builds/9563
Original issue's description:
> Move the call to CRYPTO_set_NEON_capable up.
>
> BoringSSL needs to probe for NEON support via SIGILL in cases where
> getauxval isn't provided and the application doesn't do explicit
> initialisation.
>
> However, Chromium might have gone multithreaded by the time that we
> initialise BoringSSL and, although it doesn't look like we'll race the
> disposition of SIGILL with anything, it's best not to test that hope.
>
> So this change causes CRYPTO_set_NEON_capable to always be called, and
> to be called before SSL_library_init. BoringSSL will take that as a
> signal that probing for NEON support isn't needed.
>
> BUG=none
>
> Committed: https://crrev.com/fa9063829e638aeb72ede79e5d0396a81a0211d1
> Cr-Commit-Position: refs/heads/master@{#314201}
TBR=davidben@chromium.org,agl@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=none
Review URL: https://codereview.chromium.org/895013002
Cr-Commit-Position: refs/heads/master@{#314301}
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/openssl_util.cc | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/crypto/openssl_util.cc b/crypto/openssl_util.cc index 8ea1232..f41b55a 100644 --- a/crypto/openssl_util.cc +++ b/crypto/openssl_util.cc @@ -48,18 +48,6 @@ class OpenSSLInitSingleton { private: friend struct DefaultSingletonTraits<OpenSSLInitSingleton>; OpenSSLInitSingleton() { -#if defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL) - const bool has_neon = - (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; - // CRYPTO_set_NEON_capable is called before |SSL_library_init| because this - // stops BoringSSL from probing for NEON support via SIGILL in the case - // that getauxval isn't present. - CRYPTO_set_NEON_capable(has_neon); - // See https://code.google.com/p/chromium/issues/detail?id=341598 - base::CPU cpu; - CRYPTO_set_NEON_functional(!cpu.has_broken_neon()); -#endif - SSL_load_error_strings(); SSL_library_init(); int num_locks = CRYPTO_num_locks(); @@ -68,6 +56,16 @@ class OpenSSLInitSingleton { locks_.push_back(new base::Lock()); CRYPTO_set_locking_callback(LockingCallback); CRYPTO_THREADID_set_callback(CurrentThreadId); + +#if defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL) + const bool has_neon = + (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; + if (has_neon) + CRYPTO_set_NEON_capable(1); + // See https://code.google.com/p/chromium/issues/detail?id=341598 + base::CPU cpu; + CRYPTO_set_NEON_functional(!cpu.has_broken_neon()); +#endif } ~OpenSSLInitSingleton() { |