]> www.infradead.org Git - users/jedix/linux-maple.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)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 8 Mar 2025 08:22:23 +0000 (16:22 +0800)
commitbcfc8fc53f3acb3213fb9d28675244aa4ce208e0
tree44cc9ecb171a8c12457f5c78220d8db0de7d3565
parentcaa9dbb76ff52ec848a57245062aaeaa07740adc
crypto: tegra - Use separate buffer for setkey

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>
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