diff --git a/share/man/man9/crypto_request.9 b/share/man/man9/crypto_request.9 --- a/share/man/man9/crypto_request.9 +++ b/share/man/man9/crypto_request.9 @@ -28,7 +28,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd November 2, 2022 +.Dd May 8, 2025 .Dt CRYPTO_REQUEST 9 .Os .Sh NAME @@ -466,17 +466,6 @@ .Fn crypto_done . .It Fa crp_flags A bitmask of flags. -The following flags are available in addition to flags discussed previously: -.Bl -tag -width CRYPTO_F_DONE -.It Dv CRYPTO_F_DONE -Set by -.Fa crypto_done -before calling -.Fa crp_callback . -This flag is not very useful and will likely be removed in the future. -It can only be safely checked from the callback routine at which point -it is always set. -.El .It Fa crp_cipher_key Pointer to a request-specific encryption key. If this value is not set, diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/crypto_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/crypto_os.c --- a/sys/contrib/openzfs/module/os/freebsd/zfs/crypto_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/crypto_os.c @@ -196,7 +196,6 @@ break; } crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; session->fs_done = false; } return (error); diff --git a/sys/kgssapi/krb5/kcrypto_aes.c b/sys/kgssapi/krb5/kcrypto_aes.c --- a/sys/kgssapi/krb5/kcrypto_aes.c +++ b/sys/kgssapi/krb5/kcrypto_aes.c @@ -126,7 +126,6 @@ if (crp->crp_etype == EAGAIN) { crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; (void)crypto_dispatch(crp); } else { mtx_lock(&as->as_lock); diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c --- a/sys/opencrypto/crypto.c +++ b/sys/opencrypto/crypto.c @@ -1263,8 +1263,6 @@ crp->crp_obuf.cb_type <= CRYPTO_BUF_LAST, ("incoming crp with invalid output buffer type")); KASSERT(crp->crp_etype == 0, ("incoming crp with error")); - KASSERT(!(crp->crp_flags & CRYPTO_F_DONE), - ("incoming crp already done")); csp = &crp->crp_session->csp; cb_sanity(&crp->crp_buf, "input"); @@ -1653,7 +1651,6 @@ { struct cryptop *new; - MPASS((crp->crp_flags & CRYPTO_F_DONE) == 0); new = crypto_getreq(cses, how); if (new == NULL) return (NULL); @@ -1669,9 +1666,6 @@ void crypto_done(struct cryptop *crp) { - KASSERT((crp->crp_flags & CRYPTO_F_DONE) == 0, - ("crypto_done: op already done, flags 0x%x", crp->crp_flags)); - crp->crp_flags |= CRYPTO_F_DONE; if (crp->crp_etype != 0) CRYPTOSTAT_INC(cs_errs); diff --git a/sys/opencrypto/cryptodev.h b/sys/opencrypto/cryptodev.h --- a/sys/opencrypto/cryptodev.h +++ b/sys/opencrypto/cryptodev.h @@ -433,7 +433,7 @@ int crp_flags; #define CRYPTO_F_CBIMM 0x0010 /* Do callback immediately */ -#define CRYPTO_F_DONE 0x0020 /* Operation completed */ +#define CRYPTO_F_DONE 0x0020 /* Deprecated, do not use */ #define CRYPTO_F_CBIFSYNC 0x0040 /* Do CBIMM if op is synchronous */ #define CRYPTO_F_ASYNC_ORDERED 0x0100 /* Completions must happen in order */ #define CRYPTO_F_IV_SEPARATE 0x0200 /* Use crp_iv[] as IV. */ diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c --- a/sys/opencrypto/cryptodev.c +++ b/sys/opencrypto/cryptodev.c @@ -823,7 +823,6 @@ if (crp->crp_etype == EAGAIN) { crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; cod->done = false; goto again; } @@ -1026,7 +1025,6 @@ if (crp->crp_etype == EAGAIN) { crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; cod->done = false; goto again; } diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c --- a/sys/opencrypto/ktls_ocf.c +++ b/sys/opencrypto/ktls_ocf.c @@ -224,7 +224,6 @@ } crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; oo.done = false; counter_u64_add(ocf_retries, 1); } @@ -240,7 +239,6 @@ state = crp->crp_opaque; if (crp->crp_etype == EAGAIN) { crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; counter_u64_add(ocf_retries, 1); error = crypto_dispatch(crp); if (error != 0) { diff --git a/sys/sys/param.h b/sys/sys/param.h --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500041 +#define __FreeBSD_version 1500042 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,