freebsd-skq/sys
Conrad Meyer 0e33efe4e4 Import Blake2 algorithms (blake2b, blake2s) from libb2
The upstream repository is on github BLAKE2/libb2.  Files landed in
sys/contrib/libb2 are the unmodified upstream files, except for one
difference:  secure_zero_memory's contents have been replaced with
explicit_bzero() only because the previous implementation broke powerpc
link.  Preferential use of explicit_bzero() is in progress upstream, so
it is anticipated we will be able to drop this diff in the future.

sys/crypto/blake2 contains the source files needed to port libb2 to our
build system, a wrapped (limited) variant of the algorithm to match the API
of our auth_transform softcrypto abstraction, incorporation into the Open
Crypto Framework (OCF) cryptosoft(4) driver, as well as an x86 SSE/AVX
accelerated OCF driver, blake2(4).

Optimized variants of blake2 are compiled for a number of x86 machines
(anything from SSE2 to AVX + XOP).  On those machines, FPU context will need
to be explicitly saved before using blake2(4)-provided algorithms directly.
Use via cryptodev / OCF saves FPU state automatically, and use via the
auth_transform softcrypto abstraction does not use FPU.

The intent of the OCF driver is mostly to enable testing in userspace via
/dev/crypto.  ATF tests are added with published KAT test vectors to
validate correctness.

Reviewed by:	jhb, markj
Obtained from:	github BLAKE2/libb2
Differential Revision:	https://reviews.freebsd.org/D14662
2018-03-21 16:18:14 +00:00
..
amd64 Move the CR0.WP manipulation KPI to x86. 2018-03-20 20:20:49 +00:00
arm This is MPSAFE on this platform, so don't take Giant out while running 2018-03-21 14:47:08 +00:00
arm64 Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
bsm
cam Revert r331273: "Release the "TUR" reference when clearing the TUR work flag. We mostly" 2018-03-21 12:55:59 +00:00
cddl Revert part of r331264: disable interrupts before disabling WP. 2018-03-20 21:36:35 +00:00
compat Regenerate sysent files after r331279. 2018-03-21 01:17:01 +00:00
conf Import Blake2 algorithms (blake2b, blake2s) from libb2 2018-03-21 16:18:14 +00:00
contrib Import Blake2 algorithms (blake2b, blake2s) from libb2 2018-03-21 16:18:14 +00:00
crypto Import Blake2 algorithms (blake2b, blake2s) from libb2 2018-03-21 16:18:14 +00:00
ddb db_script_exec: use a saved script name when reporting commands executed 2018-03-04 13:27:21 +00:00
dev Update copyright per Matthew Macy 2018-03-21 15:57:36 +00:00
dts sys/dts: Remove arm64 from subdir as it no longer exists. 2018-03-19 15:35:26 +00:00
fs Revert r313780 (UFS_ prefix) 2018-03-17 12:59:55 +00:00
gdb amd64: Protect the kernel text, data, and BSS by setting the RW/NX bits 2018-03-06 14:28:37 +00:00
geom Remove unneeded variable which was introduced in r328472. 2018-03-18 15:09:55 +00:00
gnu bwn(4): txpid2g/txpid5g[lh] are not defined after sromrev 7; the default 2018-02-13 17:43:54 +00:00
i386 Restore close quote lost in r331254 2018-03-20 21:04:47 +00:00
isa Revert r330780, it was improperly tested and results in taking a spin 2018-03-11 20:13:15 +00:00
kern bufshutdown is no longer called with Giant held, so there's no need to 2018-03-21 14:46:59 +00:00
kgssapi kgssapi: Remove trivial deadcode 2018-02-14 00:12:03 +00:00
libkern iconv uses strlen directly on user supplied memory 2018-02-26 18:23:36 +00:00
mips Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
modules Import Blake2 algorithms (blake2b, blake2s) from libb2 2018-03-21 16:18:14 +00:00
net Use count(9) api for the bpf(4) statistics. 2018-03-20 22:57:06 +00:00
net80211 net80211: wrap protection frame allocation into ieee80211_alloc_prot() 2018-03-09 11:33:56 +00:00
netgraph Correct pseudo misspelling in sys/ comments 2018-02-23 18:15:50 +00:00
netinet If the INP lock is uncontested, avoid taking a reference and jumping 2018-03-21 15:54:46 +00:00
netinet6 If the INP lock is uncontested, avoid taking a reference and jumping 2018-03-21 15:54:46 +00:00
netipsec Set the proper vnet in IPsec callback functions. 2018-03-20 17:05:23 +00:00
netpfil pf: Fix memory leak in DIOCRADDTABLES 2018-03-19 21:13:25 +00:00
netsmb Unsign some values related to allocation. 2018-01-22 02:08:10 +00:00
nfs Modernize nfssvc(2) registartion. 2018-02-08 20:09:42 +00:00
nfsclient style: Remove remaining deprecated MALLOC/FREE macros 2018-01-25 22:25:13 +00:00
nfsserver sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nlm Use syscall_helper_register() to register syscalls and initialize though 2018-02-10 01:09:22 +00:00
ofed Remove redundant integer cast in ibcore. The "ref_count" field already 2018-03-19 13:51:33 +00:00
opencrypto Import Blake2 algorithms (blake2b, blake2s) from libb2 2018-03-21 16:18:14 +00:00
powerpc Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
riscv Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
rpc Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
security audit(4): fix a typo in a comment 2018-03-17 17:56:08 +00:00
sparc64 Mark psycho interrupts as MPSAFE. It's safe to do so now that we don't 2018-03-21 14:47:17 +00:00
sys Move sysinit and sysuninit linker sets in the data (writeable) section. 2018-03-21 10:26:39 +00:00
teken sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
tests
tools Avoid using \$. It's an unknown escape sequence. Some awks warn about 2018-01-28 05:13:08 +00:00
ufs Revert r313780 (UFS_ prefix) 2018-03-17 12:59:55 +00:00
vm Check for wrap-around in vm_phys_alloc_seg_contig(). 2018-03-20 16:17:55 +00:00
x86 Move the CR0.WP manipulation KPI to x86. 2018-03-20 20:20:49 +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