Allow AESNI to be used on all processor supporting AESNI, not just Intel's This impro...
authorEric Vannier <evannier@google.com>
Fri, 23 Mar 2018 04:32:56 +0000 (21:32 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 27 Mar 2018 11:50:09 +0000 (13:50 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13302

Signed-off-by: Eric Vannier <evannier@google.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 27 13:50:09 CEST 2018 on sn-devel-144

lib/crypto/aes.c

index c226ac1b3df26677e0ec3621103bcfaae737f450..d16d715482e5608ba56dd0b34a6340a40d46d4fd 100644 (file)
@@ -66,22 +66,6 @@ static bool has_intel_aes_instructions(void)
                return (bool)has_aes_instructions;
        }
 
-       __cpuid(cpuid_results, 0);
-       /*
-        *        MSB         LSB
-        *  EBX = 'u' 'n' 'e' 'G'
-        *  EDX = 'I' 'e' 'n' 'i'
-        *  ECX = 'l' 'e' 't' 'n'
-        */
-       if (memcmp((unsigned char *)&cpuid_results[1], "Genu", 4) != 0 ||
-                       memcmp((unsigned char *)&cpuid_results[3],
-                               "ineI", 4) != 0 ||
-                       memcmp((unsigned char *)&cpuid_results[2],
-                               "ntel", 4) != 0) {
-               has_aes_instructions = 0;
-               return (bool)has_aes_instructions;
-       }
-
        __cpuid(cpuid_results, 1);
        has_aes_instructions = !!(cpuid_results[2] & (1 << 25));
        return (bool)has_aes_instructions;