[PATCH] Use Intel AES instruction set if it exists.
jra at samba.org
Thu Aug 31 20:32:36 UTC 2017
This is somewhat of a "go faster" switch for Samba
with SMB1/2/3 signing and encryption.
Originally developed by Justin @ Netgear this
adds the Intel AES instruction set code from
the Linux kernel into third_party (it's GPLv2+
so the licensing is good).
The first patch adds the new code to third_party
and sets the HAVE_AESNI_INTEL config to 1 if found.
The second patch prepares lib/crypto/aes.c to call
the AES instructions and the third one adds the
runtime check (as we may have been compiled on
a system with Intel AES but be running on a system
without) to switch us into the hardware AES instructions
if available. NB. This doesn't change the Heimdal
aes code, just the code in lib/crypto called by
smbd and others.
It's a pretty minimal patchset and hopefully
pretty easy to understand and review as it
doesn't change any of the existing crypto
calls (except to rename their aes key schedule
variable inside the struct).
It would be good to get this in as it has been
found to give up to a 200% performance improvement
on certain workloads, and some variant of this
patch is already being included by most Samba
This will make it available to all, and has been
sorely needed in stock Samba for a while.
I've tested with and without HAVE_AESNI_INTEL
being detected and it compiles and runs in
I've logged a bug:
for this so if it gets in we should be
able to get this into 4.7.x (for x = 0 or
Please review and push if happy !
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 102121 bytes
Desc: not available
More information about the samba-technical