LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Kai Ye <yekai13@huawei.com>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	wangzhou1@hisilicon.com
Subject: Re: [PATCH v2 2/5] crypto: hisilicon/sec - delete the print of fallback tfm application failure
Date: Thu, 12 Aug 2021 18:53:07 +0800	[thread overview]
Message-ID: <20210812105307.GA5890@gondor.apana.org.au> (raw)
In-Reply-To: <1628243066-32648-3-git-send-email-yekai13@huawei.com>

On Fri, Aug 06, 2021 at 05:44:23PM +0800, Kai Ye wrote:
> Modify the print of information that might lead to user misunderstanding.
> Currently only XTS mode need the fallback tfm when using 192bit key.
> Others algs not need soft fallback tfm. So others algs can return
> directly.
> 
> Signed-off-by: Kai Ye <yekai13@huawei.com>
> ---
>  drivers/crypto/hisilicon/sec2/sec_crypto.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)

I still don't get the point of this change.  Fallbacks are typically
the software implementation, and they should never fail except when
you run out of memory.  So what do you gain by delaying the error
from allocation time to runtime?

Cheers,
-- 
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

  reply	other threads:[~2021-08-12 10:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06  9:44 [PATCH v2 0/5] crypto: hisilicon - some misc bugfix for SEC engine Kai Ye
2021-08-06  9:44 ` [PATCH v2 1/5] crypto: hisilicon/sec - fixup icv checking enabled on Kunpeng 930 Kai Ye
2021-08-06  9:44 ` [PATCH v2 2/5] crypto: hisilicon/sec - delete the print of fallback tfm application failure Kai Ye
2021-08-12 10:53   ` Herbert Xu [this message]
2021-08-06  9:44 ` [PATCH v2 3/5] crypto: hisilicon/sec - fix the max length of AAD for the CCM mode Kai Ye
2021-08-06  9:44 ` [PATCH v2 4/5] crypto: hisilicon/sec - fix the CTR mode BD configuration Kai Ye
2021-08-06  9:44 ` [PATCH v2 5/5] crypto: hisilicon/sec - use the correct print format Kai Ye

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=20210812105307.GA5890@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wangzhou1@hisilicon.com \
    --cc=yekai13@huawei.com \
    --subject='Re: [PATCH v2 2/5] crypto: hisilicon/sec - delete the print of fallback tfm application failure' \
    /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

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).