git: 8adcc757b82c - main - opencrypto: Add comments describing the new crypto_session layout
Mark Johnston
markj at FreeBSD.org
Wed Jan 20 02:33:26 UTC 2021
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=8adcc757b82c9c80ad743a11292287cebdb6d6f9
commit 8adcc757b82c9c80ad743a11292287cebdb6d6f9
Author: Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-01-20 02:32:33 +0000
Commit: Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-01-20 02:32:33 +0000
opencrypto: Add comments describing the new crypto_session layout
Requested by: rpokala
---
sys/opencrypto/crypto.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c
index fc4169fb2365..0316eb35361a 100644
--- a/sys/opencrypto/crypto.c
+++ b/sys/opencrypto/crypto.c
@@ -136,6 +136,7 @@ struct crypto_session {
struct cryptocap *cap;
struct crypto_session_params csp;
uint64_t id;
+ /* Driver softc follows. */
};
/*
@@ -942,6 +943,7 @@ crypto_newsession(crypto_session_t *cses,
cap->cc_sessions++;
CRYPTO_DRIVER_UNLOCK();
+ /* Allocate a single block for the generic session and driver softc. */
res = malloc(sizeof(*res) + cap->cc_session_size, M_CRYPTO_DATA,
M_WAITOK | M_ZERO);
res->cap = cap;
More information about the dev-commits-src-all
mailing list