From: Ankur Dwivedi Date: Fri, 3 Jul 2020 05:41:39 +0000 (+0530) Subject: crypto/octeontx: reset session private data X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0b345f41675af1b4ce55889bcec62ca59147f937;p=dpdk.git crypto/octeontx: reset session private data 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 --- diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c index 265e10e6a4..8f58fe2559 100644 --- a/drivers/crypto/octeontx/otx_cryptodev_ops.c +++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c @@ -252,6 +252,9 @@ sym_session_configure(int driver_id, struct rte_crypto_sym_xform *xform, return -ENOMEM; } + memset(priv, 0, sizeof(struct cpt_sess_misc) + + offsetof(struct cpt_ctx, fctx)); + misc = priv; for ( ; xform != NULL; xform = xform->next) {