Re: [PATCH] crypto: tcrypt: stop ahash speed tests when setkey fails

From: Herbert Xu

Date: Sat Mar 14 2026 - 01:12:22 EST


On Mon, Mar 02, 2026 at 04:06:40PM -0800, Saeed Mirzamohammadi wrote:
> The async hash speed path ignores the return code from
> crypto_ahash_setkey(). If the caller picks an unsupported key length,
> the transform keeps whatever key state it already has and the speed test
> still runs, producing misleading numbers, hence bail out of the loop when
> setkey fails.
>
> Signed-off-by: Saeed Mirzamohammadi <saeed.mirzamohammadi@xxxxxxxxxx>
> ---
> crypto/tcrypt.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt