From: Wentao Liang <vulab@iscas.ac.cn>
To: akhilrajeev@nvidia.com, herbert@gondor.apana.org.au,
davem@davemloft.net, thierry.reding@gmail.com,
jonathanh@nvidia.com
Cc: linux-crypto@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, Wentao Liang <vulab@iscas.ac.cn>
Subject: [PATCH] crypto: tegra: Add crypto config in tegra_cmac_do_final()
Date: Mon, 26 May 2025 10:04:02 +0800 [thread overview]
Message-ID: <20250526020403.230-1-vulab@iscas.ac.cn> (raw)
The function tegra_cmac_do_final() calls the function tegra234_aes_cfg(),
but does not call tegra234_aes_crypto_cfg() to have a crypto
configuration. A proper implementation can be found in
tegra_ccm_do_ctr().
Add the tegra234_aes_crypto_cfg() for configuration.
Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
drivers/crypto/tegra/tegra-se-aes.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/crypto/tegra/tegra-se-aes.c b/drivers/crypto/tegra/tegra-se-aes.c
index 9d130592cc0a..e01653985a31 100644
--- a/drivers/crypto/tegra/tegra-se-aes.c
+++ b/drivers/crypto/tegra/tegra-se-aes.c
@@ -1550,6 +1550,8 @@ static int tegra_cmac_do_final(struct ahash_request *req)
rctx->datbuf.size = rctx->residue.size;
rctx->total_len += rctx->residue.size;
rctx->config = tegra234_aes_cfg(SE_ALG_CMAC, 0);
+ rctx->crypto_config = tegra234_aes_crypto_cfg(SE_ALG_CMAC, 0) |
+ SE_AES_KEY_INDEX(ctx->key_id);
/* Prepare command and submit */
cmdlen = tegra_cmac_prep_cmd(ctx, rctx);
--
2.42.0.windows.2
next reply other threads:[~2025-05-26 2:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-26 2:04 Wentao Liang [this message]
2025-06-11 9:16 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250526020403.230-1-vulab@iscas.ac.cn \
--to=vulab@iscas.ac.cn \
--cc=akhilrajeev@nvidia.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jonathanh@nvidia.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®