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 <adwivedi@marvell.com>
This commit is contained in:
Ankur Dwivedi 2020-07-03 11:11:39 +05:30 committed by Thomas Monjalon
parent 966b43fd99
commit 0b345f4167

View File

@ -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) {