* [PATCH] crypto: tcrypt - fix skcipher multi-buffer tests for 1420B blocks
@ 2021-10-15 7:39 Horia Geantă
2021-10-22 12:36 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Horia Geantă @ 2021-10-15 7:39 UTC (permalink / raw)
To: Herbert Xu, David S. Miller, Ard Biesheuvel
Cc: Pankaj Gupta, linux-crypto, NXP Linux Team, linux-kernel
Commit ad6d66bcac77e ("crypto: tcrypt - include 1420 byte blocks in aead and skcipher benchmarks")
mentions:
> power-of-2 block size. So let's add 1420 bytes explicitly, and round
> it up to the next blocksize multiple of the algo in question if it
> does not support 1420 byte blocks.
but misses updating skcipher multi-buffer tests.
Fix this by using the proper (rounded) input size.
Fixes: ad6d66bcac77e ("crypto: tcrypt - include 1420 byte blocks in aead and skcipher benchmarks")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
---
crypto/tcrypt.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 82b0400985a5..00149657a4bc 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -1333,7 +1333,7 @@ static void test_mb_skcipher_speed(const char *algo, int enc, int secs,
if (bs > XBUFSIZE * PAGE_SIZE) {
pr_err("template (%u) too big for buffer (%lu)\n",
- *b_size, XBUFSIZE * PAGE_SIZE);
+ bs, XBUFSIZE * PAGE_SIZE);
goto out;
}
@@ -1386,8 +1386,7 @@ static void test_mb_skcipher_speed(const char *algo, int enc, int secs,
memset(cur->xbuf[p], 0xff, k);
skcipher_request_set_crypt(cur->req, cur->sg,
- cur->sg, *b_size,
- iv);
+ cur->sg, bs, iv);
}
if (secs) {
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: tcrypt - fix skcipher multi-buffer tests for 1420B blocks
2021-10-15 7:39 [PATCH] crypto: tcrypt - fix skcipher multi-buffer tests for 1420B blocks Horia Geantă
@ 2021-10-22 12:36 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2021-10-22 12:36 UTC (permalink / raw)
To: Horia Geantă
Cc: David S. Miller, Ard Biesheuvel, Pankaj Gupta, linux-crypto,
NXP Linux Team, linux-kernel
On Fri, Oct 15, 2021 at 10:39:18AM +0300, Horia Geantă wrote:
> Commit ad6d66bcac77e ("crypto: tcrypt - include 1420 byte blocks in aead and skcipher benchmarks")
> mentions:
> > power-of-2 block size. So let's add 1420 bytes explicitly, and round
> > it up to the next blocksize multiple of the algo in question if it
> > does not support 1420 byte blocks.
> but misses updating skcipher multi-buffer tests.
>
> Fix this by using the proper (rounded) input size.
>
> Fixes: ad6d66bcac77e ("crypto: tcrypt - include 1420 byte blocks in aead and skcipher benchmarks")
> Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
> ---
> crypto/tcrypt.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-22 12:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15 7:39 [PATCH] crypto: tcrypt - fix skcipher multi-buffer tests for 1420B blocks Horia Geantă
2021-10-22 12:36 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).