From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Jussi Kivilinna <jussi.kivilinna@mbnet.fi>,
Johannes Goetzfried
<Johannes.Goetzfried@informatik.stud.uni-erlangen.de>
Cc: "David S. Miller" <davem@davemloft.net>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-crypto@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] crypto: remove a duplicate checks in __cbc_decrypt()
Date: Fri, 14 Feb 2014 19:43:51 +0200 [thread overview]
Message-ID: <52FE55D7.7020706@iki.fi> (raw)
In-Reply-To: <20140213145832.GA11059@elgon.mountain>
On 13.02.2014 16:58, Dan Carpenter wrote:
> We checked "nbytes < bsize" before so it can't happen here.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
> ---
> This doesn't change how the code works, but maybe their is a bug in the
> original code. Please review?
>
> diff --git a/arch/x86/crypto/cast5_avx_glue.c b/arch/x86/crypto/cast5_avx_glue.c
> index e6a3700489b9..e57e20ab5e0b 100644
> --- a/arch/x86/crypto/cast5_avx_glue.c
> +++ b/arch/x86/crypto/cast5_avx_glue.c
> @@ -203,9 +203,6 @@ static unsigned int __cbc_decrypt(struct blkcipher_desc *desc,
> src -= 1;
> dst -= 1;
> } while (nbytes >= bsize * CAST5_PARALLEL_BLOCKS);
> -
> - if (nbytes < bsize)
> - goto done;
> }
>
> /* Handle leftovers */
> diff --git a/arch/x86/crypto/blowfish_glue.c b/arch/x86/crypto/blowfish_glue.c
> index 50ec333b70e6..8af519ed73d1 100644
> --- a/arch/x86/crypto/blowfish_glue.c
> +++ b/arch/x86/crypto/blowfish_glue.c
> @@ -223,9 +223,6 @@ static unsigned int __cbc_decrypt(struct blkcipher_desc *desc,
> src -= 1;
> dst -= 1;
> } while (nbytes >= bsize * 4);
> -
> - if (nbytes < bsize)
> - goto done;
> }
>
> /* Handle leftovers */
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2014-02-14 17:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-13 14:58 [patch] crypto: remove a duplicate checks in __cbc_decrypt() Dan Carpenter
2014-02-14 17:43 ` Jussi Kivilinna [this message]
2014-02-14 17:55 ` Johannes Götzfried
2014-02-25 12:18 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52FE55D7.7020706@iki.fi \
--to=jussi.kivilinna@iki.fi \
--cc=Johannes.Goetzfried@informatik.stud.uni-erlangen.de \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=jussi.kivilinna@mbnet.fi \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox