The Samba-Bugzilla – Attachment 14077 Details for
Bug 13302
smbd does not support AESNI on AMD platforms
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Revised git-am fix for master.
0001-lib-crypto-Assume-bit-25-being-set-means-AESNI-is-av.patch (text/plain), 1.39 KB, created by
Jeremy Allison
on 2018-03-22 23:54:56 UTC
(
hide
)
Description:
Revised git-am fix for master.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2018-03-22 23:54:56 UTC
Size:
1.39 KB
patch
obsolete
>From c8cb9c119b635d85ed6cdf95cf9006c4d2d3558f Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Thu, 22 Mar 2018 16:46:11 -0700 >Subject: [PATCH] lib: crypto: Assume bit 25 being set means AESNI is > available. > >See: > >https://en.wikipedia.org/wiki/CPUID > >for details on this assumption. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13302 > >Based on an idea by Eric Vannier <evannier@google.com> > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > lib/crypto/aes.c | 17 +---------------- > 1 file changed, 1 insertion(+), 16 deletions(-) > >diff --git a/lib/crypto/aes.c b/lib/crypto/aes.c >index c226ac1b3df..f4fe2c9815e 100644 >--- a/lib/crypto/aes.c >+++ b/lib/crypto/aes.c >@@ -66,22 +66,7 @@ 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; >- } >- >+ memset(cpuid_results, '\0', sizeof(cpuid_results)); > __cpuid(cpuid_results, 1); > has_aes_instructions = !!(cpuid_results[2] & (1 << 25)); > return (bool)has_aes_instructions; >-- >2.14.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 13302
:
14067
|
14076
|
14077
|
14078
|
14087