[dpdk-dev] [PATCH v2 3/8] crypto/octeontx: set session private data
Ankur Dwivedi
adwivedi at marvell.com
Fri Jul 3 07:41:39 CEST 2020
This patch sets the first 32 bytes of session private data
to zero. This prevents garbage data to be used in code logic.
Signed-off-by: Ankur Dwivedi <adwivedi at marvell.com>
---
drivers/crypto/octeontx/otx_cryptodev_ops.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c
index 265e10e..8f58fe2 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
@@ -252,6 +252,9 @@
return -ENOMEM;
}
+ memset(priv, 0, sizeof(struct cpt_sess_misc) +
+ offsetof(struct cpt_ctx, fctx));
+
misc = priv;
for ( ; xform != NULL; xform = xform->next) {
--
1.9.3
More information about the dev
mailing list