* [PATCH cryptodev buildfix] crypto: s390/aes - fix typo in XTS_BLOCK_SIZE identifier
@ 2019-08-22 10:24 Ard Biesheuvel
2019-08-22 12:15 ` Herbert Xu
2019-09-04 14:21 ` Harald Freudenberger
0 siblings, 2 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2019-08-22 10:24 UTC (permalink / raw)
To: linux-crypto; +Cc: herbert, Ard Biesheuvel
Fix a typo XTS_BLOCKSIZE -> XTS_BLOCK_SIZE, causing the build to
break.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Apologies for the sloppiness.
Herbert, could we please merge this before cryptodev hits -next?
arch/s390/crypto/aes_s390.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c
index a34faadc757e..d4f6fd42a105 100644
--- a/arch/s390/crypto/aes_s390.c
+++ b/arch/s390/crypto/aes_s390.c
@@ -586,7 +586,7 @@ static int xts_aes_encrypt(struct blkcipher_desc *desc,
struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
struct blkcipher_walk walk;
- if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCKSIZE) != 0))
+ if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCK_SIZE) != 0))
return xts_fallback_encrypt(desc, dst, src, nbytes);
blkcipher_walk_init(&walk, dst, src, nbytes);
@@ -600,7 +600,7 @@ static int xts_aes_decrypt(struct blkcipher_desc *desc,
struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
struct blkcipher_walk walk;
- if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCKSIZE) != 0))
+ if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCK_SIZE) != 0))
return xts_fallback_decrypt(desc, dst, src, nbytes);
blkcipher_walk_init(&walk, dst, src, nbytes);
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH cryptodev buildfix] crypto: s390/aes - fix typo in XTS_BLOCK_SIZE identifier
2019-08-22 10:24 [PATCH cryptodev buildfix] crypto: s390/aes - fix typo in XTS_BLOCK_SIZE identifier Ard Biesheuvel
@ 2019-08-22 12:15 ` Herbert Xu
2019-09-04 14:21 ` Harald Freudenberger
1 sibling, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2019-08-22 12:15 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: linux-crypto
On Thu, Aug 22, 2019 at 01:24:54PM +0300, Ard Biesheuvel wrote:
> Fix a typo XTS_BLOCKSIZE -> XTS_BLOCK_SIZE, causing the build to
> break.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> Apologies for the sloppiness.
>
> Herbert, could we please merge this before cryptodev hits -next?
>
> arch/s390/crypto/aes_s390.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 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] 4+ messages in thread
* Re: [PATCH cryptodev buildfix] crypto: s390/aes - fix typo in XTS_BLOCK_SIZE identifier
2019-08-22 10:24 [PATCH cryptodev buildfix] crypto: s390/aes - fix typo in XTS_BLOCK_SIZE identifier Ard Biesheuvel
2019-08-22 12:15 ` Herbert Xu
@ 2019-09-04 14:21 ` Harald Freudenberger
2019-09-04 14:23 ` Ard Biesheuvel
1 sibling, 1 reply; 4+ messages in thread
From: Harald Freudenberger @ 2019-09-04 14:21 UTC (permalink / raw)
To: Ard Biesheuvel, linux-crypto
Cc: herbert, Christian Borntraeger, Reinhard Buendgen
On 22.08.19 12:24, Ard Biesheuvel wrote:
> Fix a typo XTS_BLOCKSIZE -> XTS_BLOCK_SIZE, causing the build to
> break.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> Apologies for the sloppiness.
>
> Herbert, could we please merge this before cryptodev hits -next?
>
> arch/s390/crypto/aes_s390.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c
> index a34faadc757e..d4f6fd42a105 100644
> --- a/arch/s390/crypto/aes_s390.c
> +++ b/arch/s390/crypto/aes_s390.c
> @@ -586,7 +586,7 @@ static int xts_aes_encrypt(struct blkcipher_desc *desc,
> struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
> struct blkcipher_walk walk;
>
> - if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCKSIZE) != 0))
> + if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCK_SIZE) != 0))
> return xts_fallback_encrypt(desc, dst, src, nbytes);
>
> blkcipher_walk_init(&walk, dst, src, nbytes);
> @@ -600,7 +600,7 @@ static int xts_aes_decrypt(struct blkcipher_desc *desc,
> struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
> struct blkcipher_walk walk;
>
> - if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCKSIZE) != 0))
> + if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCK_SIZE) != 0))
> return xts_fallback_decrypt(desc, dst, src, nbytes);
>
> blkcipher_walk_init(&walk, dst, src, nbytes);
Applied together with the aes xts common code fix and the testmanager fixes,
build and tested. Works fine, Thanks.
With the 'extra run-time crypto self tests' enabled I see a failure of the s390 xts
implementation when nbytes=0 is used (should return with EINVAL but actually
returns with 0). I'll send a fix for this via the s390 maintainers.
regards
Harald Freudenberger
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH cryptodev buildfix] crypto: s390/aes - fix typo in XTS_BLOCK_SIZE identifier
2019-09-04 14:21 ` Harald Freudenberger
@ 2019-09-04 14:23 ` Ard Biesheuvel
0 siblings, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2019-09-04 14:23 UTC (permalink / raw)
To: Harald Freudenberger
Cc: open list:HARDWARE RANDOM NUMBER GENERATOR CORE, Herbert Xu,
Christian Borntraeger, Reinhard Buendgen
On Wed, 4 Sep 2019 at 07:21, Harald Freudenberger <freude@linux.ibm.com> wrote:
>
> On 22.08.19 12:24, Ard Biesheuvel wrote:
> > Fix a typo XTS_BLOCKSIZE -> XTS_BLOCK_SIZE, causing the build to
> > break.
> >
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > ---
> > Apologies for the sloppiness.
> >
> > Herbert, could we please merge this before cryptodev hits -next?
> >
> > arch/s390/crypto/aes_s390.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c
> > index a34faadc757e..d4f6fd42a105 100644
> > --- a/arch/s390/crypto/aes_s390.c
> > +++ b/arch/s390/crypto/aes_s390.c
> > @@ -586,7 +586,7 @@ static int xts_aes_encrypt(struct blkcipher_desc *desc,
> > struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
> > struct blkcipher_walk walk;
> >
> > - if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCKSIZE) != 0))
> > + if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCK_SIZE) != 0))
> > return xts_fallback_encrypt(desc, dst, src, nbytes);
> >
> > blkcipher_walk_init(&walk, dst, src, nbytes);
> > @@ -600,7 +600,7 @@ static int xts_aes_decrypt(struct blkcipher_desc *desc,
> > struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
> > struct blkcipher_walk walk;
> >
> > - if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCKSIZE) != 0))
> > + if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCK_SIZE) != 0))
> > return xts_fallback_decrypt(desc, dst, src, nbytes);
> >
> > blkcipher_walk_init(&walk, dst, src, nbytes);
>
> Applied together with the aes xts common code fix and the testmanager fixes,
> build and tested. Works fine, Thanks.
> With the 'extra run-time crypto self tests' enabled I see a failure of the s390 xts
> implementation when nbytes=0 is used (should return with EINVAL but actually
> returns with 0). I'll send a fix for this via the s390 maintainers.
Thanks Harald.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-09-04 14:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-22 10:24 [PATCH cryptodev buildfix] crypto: s390/aes - fix typo in XTS_BLOCK_SIZE identifier Ard Biesheuvel
2019-08-22 12:15 ` Herbert Xu
2019-09-04 14:21 ` Harald Freudenberger
2019-09-04 14:23 ` Ard Biesheuvel
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).