freebsd-nq/sys/opencrypto
John Baldwin 688f8b822c Remove the cloned file descriptors for /dev/crypto.
Crypto file descriptors were added in the original OCF import as a way
to provide per-open data (specifically the list of symmetric
sessions).  However, this gives a bit of a confusing API where one has
to open /dev/crypto and then invoke an ioctl to obtain a second file
descriptor.  This also does not match the API used with /dev/crypto on
other BSDs or with Linux's /dev/crypto driver.

Character devices have gained support for per-open data via cdevpriv
since OCF was imported, so use cdevpriv to simplify the userland API
by permitting ioctls directly on /dev/crypto descriptors.

To provide backwards compatibility, CRIOGET now opens another
/dev/crypto descriptor via kern_openat() rather than dup'ing the
existing file descriptor.  This preserves prior semantics in case
CRIOGET is invoked multiple times on a single file descriptor.

Reviewed by:	markj
Relnotes:	yes
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D27302
2020-11-25 00:10:54 +00:00
..
_cryptodev.h
cbc_mac.c
cbc_mac.h
criov.c
crypto.c
cryptodeflate.c
cryptodev_if.m
cryptodev.c
cryptodev.h
cryptosoft.c
deflate.h
gfmult.c
gfmult.h
gmac.c
gmac.h
ktls_ocf.c
rmd160.c
rmd160.h
xform_aes_icm.c
xform_aes_xts.c
xform_auth.h
xform_cbc_mac.c
xform_cml.c
xform_comp.h
xform_deflate.c
xform_enc.h
xform_gmac.c
xform_null.c
xform_poly1305.c
xform_poly1305.h
xform_rijndael.c
xform_rmd160.c
xform_sha1.c
xform_sha2.c
xform.c
xform.h