]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: tegra - Use separate buffer for setkey
authorAkhil R <akhilrajeev@nvidia.com>
Mon, 24 Feb 2025 09:16:01 +0000 (14:46 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:17 +0000 (14:39 +0200)
commit5d9147db00d3590ba9d2a8ff947da0c5a899590d
tree3ce048be83be1109ccf730e6be6bdd382b0f3469
parentf23dfee54b57a8d95d39a4f1a0e893f28dfbb668
crypto: tegra - Use separate buffer for setkey

[ Upstream commit bcfc8fc53f3acb3213fb9d28675244aa4ce208e0 ]

The buffer which sends the commands to host1x was shared for all tasks
in the engine. This causes a problem with the setkey() function as it
gets called asynchronous to the crypto engine queue. Modifying the same
cmdbuf in setkey() will corrupt the ongoing host1x task and in turn
break the encryption/decryption operation. Hence use a separate cmdbuf
for setkey().

Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/tegra/tegra-se-aes.c
drivers/crypto/tegra/tegra-se-hash.c
drivers/crypto/tegra/tegra-se-key.c
drivers/crypto/tegra/tegra-se-main.c
drivers/crypto/tegra/tegra-se.h