summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2020-11-25 00:10:54 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2020-11-25 00:10:54 +0000
commit688f8b822cea550753e7f3495339141cb6b565b7 (patch)
tree3cd4ee29d26786fc5cae6115ca6dd069672d5456 /lib
parent908dca3ef4695fe0abf4001ea2b3f73e9247a540 (diff)
downloadsrc-test-688f8b822cea550753e7f3495339141cb6b565b7.tar.gz
src-test-688f8b822cea550753e7f3495339141cb6b565b7.zip
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
Notes
Notes: svn path=/head/; revision=368005
Diffstat (limited to 'lib')
-rw-r--r--lib/libprocstat/libprocstat.c1
-rw-r--r--lib/libprocstat/libprocstat.h2
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c
index a3545b9198960..8d10c2900459e 100644
--- a/lib/libprocstat/libprocstat.c
+++ b/lib/libprocstat/libprocstat.c
@@ -708,7 +708,6 @@ kinfo_type2fst(int kftype)
int fst_type;
} kftypes2fst[] = {
{ KF_TYPE_PROCDESC, PS_FST_TYPE_PROCDESC },
- { KF_TYPE_CRYPTO, PS_FST_TYPE_CRYPTO },
{ KF_TYPE_DEV, PS_FST_TYPE_DEV },
{ KF_TYPE_FIFO, PS_FST_TYPE_FIFO },
{ KF_TYPE_KQUEUE, PS_FST_TYPE_KQUEUE },
diff --git a/lib/libprocstat/libprocstat.h b/lib/libprocstat/libprocstat.h
index 6e03ef515444d..4ef34da75ec2f 100644
--- a/lib/libprocstat/libprocstat.h
+++ b/lib/libprocstat/libprocstat.h
@@ -64,7 +64,7 @@
#define PS_FST_TYPE_PIPE 4
#define PS_FST_TYPE_PTS 5
#define PS_FST_TYPE_KQUEUE 6
-#define PS_FST_TYPE_CRYPTO 7
+/* was PS_FST_TYPE_CRYPTO 7 */
#define PS_FST_TYPE_MQUEUE 8
#define PS_FST_TYPE_SHM 9
#define PS_FST_TYPE_SEM 10