mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: T Pratham <t-pratham@ti.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Praneeth Bajjuri <praneeth@ti.com>,
	Kamlesh Gurudasani <kamlesh@ti.com>,
	Manorit Chawdhry <m-chawdhry@ti.com>
Subject: Re: [PATCH RFC 1/2] crypto: ti: Add support for SHA224/256/384/512 in DTHE V2 driver
Date: Fri, 4 Apr 2025 18:23:16 +0800	[thread overview]
Message-ID: <Z--zFB8Rm007AMzP@gondor.apana.org.au> (raw)
In-Reply-To: <8aa65022-8adc-4c4a-a812-11bfd64e628c@ti.com>

On Fri, Apr 04, 2025 at 03:45:22PM +0530, T Pratham wrote:
>
> Although, I was not able to quite understand what you meant to imply
> from this snippet. And I was not able to find any references for
> HASH_FBREQ_ON_STACK as well. Overall, it was not clear why such a fbreq
> is required and where it is being used. Hence I omitted this part
> completely, and still passing all tests. Would love to know if you have
> any good reason to what you suggested.

The HASH_FBREQ_ON_STACK is part of the revamped ahash interface
that I'm working on right now.  I think you should wait for that
to be merged before reposting your driver as it would make your
job a lot easier.

> Another thing, the buflen variable ranges from 0 to BLOCK_SIZE, not
> (BLOCK_SIZE - 1). This is being used to handle certain quirks of the
> hardware together with linux crypto framework, which I am happy to
> elaborate further if required. Cutting the digression short, I have to
> find a workaround to comply with your import/export changes:

Yes that's a common problem with crypto hash drivers that can't
deal with a zero-length final update.  The best solution is to
use a fallback for the final update if it turns out to be zero-length
rather than retaining an extra block.  Hashing a single block for
finalisation is simply not worth the overhead of setting up DMA and
what not.

The other option is to use the fallback to hash the extra block in
the export function.

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:[~2025-04-04 10:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18 10:49 [PATCH RFC 0/2] Add support for hashing algorithms in TI DTHE V2 T Pratham
2025-02-18 10:49 ` [PATCH RFC 1/2] crypto: ti: Add support for SHA224/256/384/512 in DTHE V2 driver T Pratham
2025-02-19 18:36   ` Kamlesh Gurudasani
2025-03-02  8:09   ` Herbert Xu
2025-04-02 13:31     ` T Pratham
2025-04-02 13:54       ` Herbert Xu
2025-04-02 14:12         ` T Pratham
2025-04-02 14:16           ` Herbert Xu
2025-04-03  8:28       ` T Pratham
2025-04-03  8:35         ` Herbert Xu
2025-04-04 10:15           ` T Pratham
2025-04-04 10:23             ` Herbert Xu [this message]
2025-04-04 12:40               ` T Pratham
2025-04-05  1:33                 ` Herbert Xu
2025-04-05  1:36                   ` Herbert Xu
2025-02-18 10:49 ` [PATCH RFC 2/2] crypto: ti: Add support for MD5 in DTHE V2 Hashing Engine driver T Pratham
2025-02-19 18:47   ` Kamlesh Gurudasani
2025-04-02 13:50   ` Herbert Xu
2025-04-02 14:21     ` T Pratham

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=Z--zFB8Rm007AMzP@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=kamlesh@ti.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-chawdhry@ti.com \
    --cc=praneeth@ti.com \
    --cc=t-pratham@ti.com \
    --cc=vigneshr@ti.com \
    /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

all inboxes | Powered by JetHome®