[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y0aCCguqS9Gzsrqx@kernel.org>
Date: Wed, 12 Oct 2022 11:59:54 +0300
From: Jarkko Sakkinen <jarkko@...nel.org>
To: Pankaj Gupta <pankaj.gupta@....com>
Cc: a.fatoum@...gutronix.de, gilad@...yossef.com, Jason@...c4.com,
jejb@...ux.ibm.com, zohar@...ux.ibm.com, dhowells@...hat.com,
sumit.garg@...aro.org, david@...ma-star.at, michael@...le.cc,
john.ernberg@...ia.se, jmorris@...ei.org, serge@...lyn.com,
herbert@...dor.apana.org.au, davem@...emloft.net,
j.luebbe@...gutronix.de, ebiggers@...nel.org, richard@....at,
keyrings@...r.kernel.org, linux-crypto@...r.kernel.org,
linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org, sahil.malhotra@....com,
kshitiz.varshney@....com, horia.geanta@....com, V.Sethi@....com
Subject: Re: [PATCH v0 4/8] sk_cipher: checking for hw bound operation
In the short summary, please try to use imperative form and
accurate names. "Checking" means nothing.
On Thu, Oct 06, 2022 at 06:38:33PM +0530, Pankaj Gupta wrote:
> Checking for hw bound key. If yes,
> - skipping the key-length validation to fall in min-max range.
What does "-" mean here? I seriously cannot interpret what I'm
reading.
>
> Signed-off-by: Pankaj Gupta <pankaj.gupta@....com>
> ---
> crypto/skcipher.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/crypto/skcipher.c b/crypto/skcipher.c
> index 418211180cee..0f2d0228d73e 100644
> --- a/crypto/skcipher.c
> +++ b/crypto/skcipher.c
> @@ -598,7 +598,8 @@ int crypto_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key,
> unsigned long alignmask = crypto_skcipher_alignmask(tfm);
> int err;
>
> - if (keylen < cipher->min_keysize || keylen > cipher->max_keysize)
> + if ((!tfm->base.is_hbk)
> + && (keylen < cipher->min_keysize || keylen > cipher->max_keysize))
> return -EINVAL;
>
> if ((unsigned long)key & alignmask)
> --
> 2.17.1
>
BR, Jarkko
Powered by blists - more mailing lists