freebsd-nq/sys/conf
Conrad Meyer fe182ba1d0 aesni(4): Add support for x86 SHA intrinsics
Some x86 class CPUs have accelerated intrinsics for SHA1 and SHA256.
Provide this functionality on CPUs that support it.

This implements CRYPTO_SHA1, CRYPTO_SHA1_HMAC, and CRYPTO_SHA2_256_HMAC.

Correctness: The cryptotest.py suite in tests/sys/opencrypto has been
enhanced to verify SHA1 and SHA256 HMAC using standard NIST test vectors.
The test passes on this driver.  Additionally, jhb's cryptocheck tool has
been used to compare various random inputs against OpenSSL.  This test also
passes.

Rough performance averages on AMD Ryzen 1950X (4kB buffer):
aesni:      SHA1: ~8300 Mb/s    SHA256: ~8000 Mb/s
cryptosoft:       ~1800 Mb/s    SHA256: ~1800 Mb/s

So ~4.4-4.6x speedup depending on algorithm choice.  This is consistent with
the results the Linux folks saw for 4kB buffers.

The driver borrows SHA update code from sys/crypto sha1 and sha256.  The
intrinsic step function comes from Intel under a 3-clause BSDL.[0]  The
intel_sha_extensions_sha<foo>_intrinsic.c files were renamed and lightly
modified (added const, resolved a warning or two; included the sha_sse
header to declare the functions).

[0]: https://software.intel.com/en-us/articles/intel-sha-extensions-implementations

Reviewed by:	jhb
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12452
2017-09-26 23:12:32 +00:00
..
config.mk Revert r319053 due to lack of sence. As pointed out by kib@ opt_global.h 2017-06-04 18:24:41 +00:00
dtb.mk make.conf: Add the possibility to use another DTC 2017-06-17 23:34:53 +00:00
files Miscellaneous fixes and improvements to MMCCAM stack 2017-09-15 19:47:44 +00:00
files.amd64 aesni(4): Add support for x86 SHA intrinsics 2017-09-26 23:12:32 +00:00
files.arm Add ptrace operations to fetch and store VFP registers. 2017-09-14 15:03:43 +00:00
files.arm64 Add support for handling undefined instructions in userspace and the 2017-09-14 17:29:51 +00:00
files.i386 aesni(4): Add support for x86 SHA intrinsics 2017-09-26 23:12:32 +00:00
files.mips Merge projects/ipsec into head/. 2017-02-06 08:49:57 +00:00
files.powerpc Compile the atomic64 emulation for powerpcspe 2017-07-21 03:48:09 +00:00
files.riscv Support for v1.10 (latest) of RISC-V privilege specification. 2017-08-10 14:18:09 +00:00
files.sparc64 Merge projects/ipsec into head/. 2017-02-06 08:49:57 +00:00
kern.mk gcc builds: reenable -Wstrict-overflow for kern.mk 2017-09-14 03:42:41 +00:00
kern.opts.mk Add MK_TESTS to kern.opts.mk to support r31800 2017-05-09 05:03:35 +00:00
kern.post.mk Quote ${MAKE} when passing in env in case it contains spaces. 2017-08-16 17:54:24 +00:00
kern.pre.mk add arm64 objcopy output target for embedfs 2017-07-20 18:22:49 +00:00
kmod_syms_prefix.awk Add the infrastructure to support loading multiple versions of TCP 2017-06-08 20:41:28 +00:00
kmod_syms.awk
kmod.mk Include ARCH_FLAGS in CFLAGS when building modules. 2017-07-19 22:06:35 +00:00
ldscript.amd64 Introduce __read_frequently 2017-09-06 20:32:49 +00:00
ldscript.arm remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
ldscript.arm64 Explicitly include all .rodata.* sections in the kernel .rodata. This 2016-09-03 17:23:24 +00:00
ldscript.i386 use INT3 instead of NOP for x86 binary padding 2017-03-19 00:22:13 +00:00
ldscript.mips remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
ldscript.mips.cfe remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
ldscript.mips.mips64 remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
ldscript.mips.octeon1 remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
ldscript.powerpc remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
ldscript.powerpc64 remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
ldscript.powerpcspe Create a new MACHINE_ARCH for Freescale PowerPC e500v2 2016-10-22 01:57:15 +00:00
ldscript.riscv o Remove operation in machine mode. 2016-08-10 12:41:36 +00:00
ldscript.sparc64 remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
Makefile.amd64
Makefile.arm Always pass the linker emulation via -m when linking modules and kernels. 2017-04-05 03:05:04 +00:00
Makefile.arm64
Makefile.i386
Makefile.mips Compile trampoline with soft-float on MIPS, to match the rest of the kernel 2016-11-16 03:24:20 +00:00
Makefile.powerpc Don't pass -Wa,-many through clang, the integrated as doesn't support it. 2017-01-22 06:00:05 +00:00
Makefile.riscv Support for v1.10 (latest) of RISC-V privilege specification. 2017-08-10 14:18:09 +00:00
Makefile.sparc64
makeLINT.mk Migrate e1000 to the IFLIB framework: 2017-01-10 03:23:22 +00:00
makeLINT.sed
newvers.sh newvers.sh: speed up failing git-svn revision search 2017-09-11 00:14:04 +00:00
NOTES Jenkins i386 LINT build uses NOTES to generate its LINT kernel config. 2017-09-13 03:56:03 +00:00
options Add new compile-time option NVME_USE_NVD that sets the default value 2017-08-28 23:54:25 +00:00
options.amd64 Remove SVR4 (System V Release 4) binary compatibility support. 2017-02-28 05:14:42 +00:00
options.arm Remove the MULTIDELAY option from arm. It's now enabled when PLATFORM is 2017-07-07 13:55:11 +00:00
options.arm64 arm64: Add Allwinner H5 SoC 2017-08-02 20:19:19 +00:00
options.i386 Remove SVR4 (System V Release 4) binary compatibility support. 2017-02-28 05:14:42 +00:00
options.mips [mips] [rt2880] Add oldest Ralink MIPS SOC RT2880 support code. 2017-05-06 06:20:34 +00:00
options.powerpc Create a new MACHINE_ARCH for Freescale PowerPC e500v2 2016-10-22 01:57:15 +00:00
options.riscv Add full softfloat and hardfloat support for RISC-V. 2016-11-16 15:21:32 +00:00
options.sparc64
systags.sh Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
WITHOUT_SOURCELESS
WITHOUT_SOURCELESS_HOST
WITHOUT_SOURCELESS_UCODE rtwn(4), urtwn(4): merge common code, add support for 11ac devices. 2016-10-17 20:38:24 +00:00