public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Lars Persson <lars.persson@axis.com>
To: Eric Biggers <ebiggers@kernel.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Cc: Jesper Nilsson <Jesper.Nilsson@axis.com>
Subject: Re: [PATCH 2/8] crypto: artpec6 - return correct error code for failed setkey()
Date: Wed, 1 Jan 2020 17:04:06 +0100	[thread overview]
Message-ID: <28732831-36b0-659c-b65a-042232a9ff7f@axis.com> (raw)
In-Reply-To: <20191231044352.GB180988@zzz.localdomain>

On 12/31/19 5:43 AM, Eric Biggers wrote:
> [+Cc the people with Cc tags in the patch, who I accidentally didn't Cc...
>   Original message was
> https://lkml.kernel.org/linux-crypto/20191231031938.241705-3-ebiggers@kernel.org/]
> 
> On Mon, Dec 30, 2019 at 09:19:32PM -0600, Eric Biggers wrote:
>> From: Eric Biggers <ebiggers@google.com>
>> 
>> ->setkey() is supposed to retun -EINVAL for invalid key lengths, not -1.
>> 
>> Fixes: a21eb94fc4d3 ("crypto: axis - add ARTPEC-6/7 crypto accelerator driver")
>> Cc: Jesper Nilsson <jesper.nilsson@axis.com>
>> Cc: Lars Persson <lars.persson@axis.com>
>> Signed-off-by: Eric Biggers <ebiggers@google.com>
>> ---
>>  drivers/crypto/axis/artpec6_crypto.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/crypto/axis/artpec6_crypto.c b/drivers/crypto/axis/artpec6_crypto.c
>> index 4b20606983a4..22ebe40f09f5 100644
>> --- a/drivers/crypto/axis/artpec6_crypto.c
>> +++ b/drivers/crypto/axis/artpec6_crypto.c
>> @@ -1251,7 +1251,7 @@ static int artpec6_crypto_aead_set_key(struct crypto_aead *tfm, const u8 *key,
>>  
>>        if (len != 16 && len != 24 && len != 32) {
>>                crypto_aead_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
>> -             return -1;
>> +             return -EINVAL;
>>        }
>>  
>>        ctx->key_length = len;
>> -- 
>> 2.24.1
>> 

Acked-by: Lars Persson <lars.persson@axis.com>

Thanks,
  Lars

  reply	other threads:[~2020-01-01 16:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-31  3:19 [PATCH 0/8] crypto: remove the CRYPTO_TFM_RES_* flags Eric Biggers
2019-12-31  3:19 ` [PATCH 1/8] crypto: chelsio - fix writing tfm flags to wrong place Eric Biggers
2019-12-31  4:42   ` Eric Biggers
2019-12-31  3:19 ` [PATCH 2/8] crypto: artpec6 - return correct error code for failed setkey() Eric Biggers
2019-12-31  4:43   ` Eric Biggers
2020-01-01 16:04     ` Lars Persson [this message]
2019-12-31  3:19 ` [PATCH 3/8] crypto: atmel-sha - fix error handling when setting hmac key Eric Biggers
2019-12-31  4:45   ` Eric Biggers
2020-01-08 16:06   ` Tudor.Ambarus
2019-12-31  3:19 ` [PATCH 4/8] crypto: remove unused tfm result flags Eric Biggers
2019-12-31  3:19 ` [PATCH 5/8] crypto: remove CRYPTO_TFM_RES_BAD_BLOCK_LEN Eric Biggers
2019-12-31  3:19 ` [PATCH 6/8] crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN Eric Biggers
2020-01-06 15:00   ` Horia Geanta
2019-12-31  3:19 ` [PATCH 7/8] crypto: remove CRYPTO_TFM_RES_WEAK_KEY Eric Biggers
2019-12-31  3:19 ` [PATCH 8/8] crypto: remove propagation of CRYPTO_TFM_RES_* flags Eric Biggers
2019-12-31  8:14 ` [PATCH 0/8] crypto: remove the " Ard Biesheuvel
2020-01-09  5:14 ` 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=28732831-36b0-659c-b65a-042232a9ff7f@axis.com \
    --to=lars.persson@axis.com \
    --cc=Jesper.Nilsson@axis.com \
    --cc=ebiggers@kernel.org \
    --cc=linux-crypto@vger.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