freebsd-dev/sys
Conrad Meyer 844d9543dc Add ccp(4): experimental driver for AMD Crypto Co-Processor
* Registers TRNG source for random(4)
* Finds available queues, LSBs; allocates static objects
* Allocates a shared MSI-X for all queues.  The hardware does not have
  separate interrupts per queue.  Working interrupt mode driver.
* Computes SHA hashes, HMAC.  Passes cryptotest.py, cryptocheck tests.
* Does AES-CBC, CTR mode, and XTS.  cryptotest.py and cryptocheck pass.
* Support for "authenc" (AES + HMAC).  (SHA1 seems to result in
  "unaligned" cleartext inputs from cryptocheck -- which the engine
  cannot handle.  SHA2 seems to work fine.)
* GCM passes for block-multiple AAD, input lengths

Largely based on ccr(4), part of cxgbe(4).

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

As you can see, performance is poor in comparison to aesni(4) and even
cryptosoft (due to high setup cost).  At a larger buffer size (128kB),
throughput is a little better (but still worse than aesni(4)):

aesni:      SHA1:~10400 Mb/s    SHA256: ~9950 Mb/s
ccp:              ~2200 Mb/s    SHA256: ~2600 Mb/s  SHA512: ~3800 Mb/s
cryptosoft:       ~1750 Mb/s    SHA256: ~1800 Mb/s  SHA512: ~2700 Mb/s

AES performance has a similar story:

aesni:      4kB: ~11250 Mb/s    128kB: ~11250 Mb/s
ccp:               ~350 Mb/s    128kB:  ~4600 Mb/s
cryptosoft:       ~1750 Mb/s    128kB:  ~1700 Mb/s

This driver is EXPERIMENTAL.  You should verify cryptographic results on
typical and corner case inputs from your application against a known- good
implementation.

Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12723
2018-01-18 22:01:30 +00:00
..
amd64 Adjust branch target in NMI handler for the !PTI case. 2018-01-18 20:12:12 +00:00
arm arm: make some use of mallocarray(9). 2018-01-15 21:09:58 +00:00
arm64 Set the base address of translation table 0. 2018-01-18 16:20:09 +00:00
bsm sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
cam SPDX: finish tagging sys/cam. 2018-01-16 23:19:57 +00:00
cddl Use the thread's ucred struct when fetching jid or jailname. 2018-01-14 17:55:40 +00:00
compat ndis: make some use of mallocarray(9). 2018-01-15 21:11:38 +00:00
conf Use ln -n instead of -h to allow building the kernel on Linux 2018-01-16 21:43:57 +00:00
contrib libfdt: Update to 1.4.6, switch to using libfdt for overlay support 2018-01-18 04:39:09 +00:00
crypto Add ccp(4): experimental driver for AMD Crypto Co-Processor 2018-01-18 22:01:30 +00:00
ddb Implement 'domainset', a cpuset based NUMA policy mechanism. This allows 2018-01-12 22:48:23 +00:00
dev UART Clock Selection Register holds a divider value for a supplied clock, 2018-01-18 18:19:31 +00:00
dts Add a rudimentary PWM driver for the RaspberryPi. 2018-01-14 20:36:21 +00:00
fs nfs: Do not printf each time a lock structure is freed during module unload 2018-01-18 15:28:49 +00:00
gdb sys/gdb: further adoption of SPDX licensing ID tags. 2017-11-27 15:16:59 +00:00
geom gnop(8): add the ability to set a nop provider's physical path 2018-01-18 05:57:10 +00:00
gnu misc geom and gnu: make some use of mallocarray(9). 2018-01-15 21:23:16 +00:00
i386 Use long for the last argument to VOP_PATHCONF rather than a register_t. 2018-01-17 22:36:58 +00:00
isa On further testing on actual machines with this hardware, we should 2017-12-30 08:16:31 +00:00
kern correct read-ahead calculations in vfs_bio_getpages 2018-01-18 12:59:04 +00:00
kgssapi sys/kgssapi: general adoption of SPDX licensing ID tags. 2017-11-27 15:49:00 +00:00
libkern SPDX: fix wrong license ID tag in libkern. 2017-12-28 01:20:30 +00:00
mips Fix build after r328020. 2018-01-16 06:04:39 +00:00
modules Add ccp(4): experimental driver for AMD Crypto Co-Processor 2018-01-18 22:01:30 +00:00
net net*: make some use of mallocarray(9). 2018-01-15 21:21:51 +00:00
net80211 net80211: sanitize input for ieee80211_output() 2017-12-30 00:40:34 +00:00
netgraph netgraph: make some use of mallocarray(9). 2018-01-15 21:19:21 +00:00
netinet Fix a bug related to fast retransmissions. 2018-01-16 21:58:38 +00:00
netinet6 net*: make some use of mallocarray(9). 2018-01-15 21:21:51 +00:00
netipsec Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
netpfil Implement 'domainset', a cpuset based NUMA policy mechanism. This allows 2018-01-12 22:48:23 +00:00
netsmb sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nfs Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
nfsclient sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nfsserver sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nlm Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
ofed sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
opencrypto Split crp_buf into a union. 2018-01-16 19:41:18 +00:00
powerpc Call platform_smp_ap_init before decr_ap_init 2018-01-18 08:34:20 +00:00
riscv Implement NUMA support in uma(9) and malloc(9). Allocations from specific 2018-01-12 23:25:05 +00:00
rpc Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
security Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
sparc64 Implement NUMA support in uma(9) and malloc(9). Allocations from specific 2018-01-12 23:25:05 +00:00
sys Add Elf_Nhdr definition to match NetBSD, OpenBSD, Linux 2018-01-18 21:19:57 +00:00
teken sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
tests
tools embed_mfs: correctly test grep return value 2018-01-03 19:22:10 +00:00
ufs ufs: use mallocarray(9). 2018-01-17 18:18:33 +00:00
vm Move VM_NUMA_ALLOC and DEVICE_NUMA under the single global config option NUMA. 2018-01-14 03:36:03 +00:00
x86 PTI for amd64. 2018-01-17 11:44:21 +00:00
xdr sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
xen sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
Makefile Move sys/boot to stand. Fix all references to new location 2017-11-14 23:02:19 +00:00