From f813a0ed01c87777a9ed65e5463e0d8cde4657d4 Mon Sep 17 00:00:00 2001 From: fbarchard Date: Tue, 6 Oct 2015 10:42:10 -0700 Subject: Remove cpu.has_avx_hardware() Update NSS to remove work around cpu detection bug in nss 3.15 BUG=chromium:320524 Review URL: https://codereview.chromium.org/1381603004 Cr-Commit-Position: refs/heads/master@{#352633} --- crypto/nss_util.cc | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'crypto/nss_util.cc') diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc index d13170c..8e378f4 100644 --- a/crypto/nss_util.cc +++ b/crypto/nss_util.cc @@ -682,8 +682,6 @@ class NSSInitSingleton { // other threads from accessing until the constructor is done. thread_checker_.DetachFromThread(); - DisableAESNIIfNeeded(); - EnsureNSPRInit(); // We *must* have NSS >= 3.14.3. @@ -845,22 +843,6 @@ class NSSInitSingleton { } #endif - static void DisableAESNIIfNeeded() { - if (NSS_VersionCheck("3.15") && !NSS_VersionCheck("3.15.4")) { - // Some versions of NSS have a bug that causes AVX instructions to be - // used without testing whether XSAVE is enabled by the operating system. - // In order to work around this, we disable AES-NI in NSS when we find - // that |has_avx()| is false (which includes the XSAVE test). See - // https://bugzilla.mozilla.org/show_bug.cgi?id=940794 - base::CPU cpu; - - if (cpu.has_avx_hardware() && !cpu.has_avx()) { - scoped_ptr env(base::Environment::Create()); - env->SetVar("NSS_DISABLE_HW_AES", "1"); - } - } - } - bool tpm_token_enabled_for_nss_; bool initializing_tpm_token_; typedef std::vector TPMReadyCallbackList; -- cgit v1.1