* [PATCH] crypto/qat: fix incorrect sm3 state size
@ 2025-02-26 9:30 Arkadiusz Kusztal
0 siblings, 0 replies; only message in thread
From: Arkadiusz Kusztal @ 2025-02-26 9:30 UTC (permalink / raw)
To: dev; +Cc: gakhil, brian.dooley, Arkadiusz Kusztal, stable
This commit fixes incorrectly set state size within
the QAT PMD.
Fixes: 75fd4bbc94ab ("crypto/qat: support SM3 hash algorithm")
Cc: stable@dpdk.org
Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
drivers/crypto/qat/qat_sym_session.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 9b26f8a89b..7f370f03fb 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -2473,7 +2473,8 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc,
qat_hash_get_block_size(cdesc->qat_hash_alg) >> 3;
auth_param->u2.inner_prefix_sz =
qat_hash_get_block_size(cdesc->qat_hash_alg);
- auth_param->hash_state_sz = digestsize;
+ auth_param->hash_state_sz = (hash_cd_ctrl->outer_prefix_sz +
+ auth_param->u2.inner_prefix_sz) >> 3;
if (qat_dev_gen == QAT_GEN4 || qat_dev_gen == QAT_GEN5 ||
qat_dev_gen == QAT_VQAT) {
ICP_QAT_FW_HASH_FLAG_MODE2_SET(
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-26 9:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-26 9:30 [PATCH] crypto/qat: fix incorrect sm3 state size Arkadiusz Kusztal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).