lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z2_iroxlT3C1d1HQ@gondor.apana.org.au>
Date: Sat, 28 Dec 2024 19:36:14 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Akhil R <akhilrajeev@...dia.com>
Cc: davem@...emloft.net, thierry.reding@...il.com, jonathanh@...dia.com,
	linux-crypto@...r.kernel.org, linux-tegra@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/7] crypto: tegra: Use separate buffer for setkey

On Tue, Dec 17, 2024 at 09:42:01PM +0530, Akhil R wrote:
> 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@...dia.com>
> ---
>  drivers/crypto/tegra/tegra-se-aes.c  | 16 ++++++++--------
>  drivers/crypto/tegra/tegra-se-hash.c | 13 +++++++------
>  drivers/crypto/tegra/tegra-se-key.c  | 10 ++++++++--
>  drivers/crypto/tegra/tegra-se-main.c | 16 ++++++++++++----
>  drivers/crypto/tegra/tegra-se.h      |  3 ++-
>  5 files changed, 37 insertions(+), 21 deletions(-)

So there is a maximum of 15 key slots? In that case you should not
be allocating them in setkey because there can be a lot more than
15 tfm's in the system.

Since the limit is so low they should only be allocated during an
encryption/decryption operation.

Cheers,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ