[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250611035842.GB1484147@sol>
Date: Tue, 10 Jun 2025 20:58:42 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mips@...r.kernel.org,
linux-riscv@...ts.infradead.org, linux-s390@...r.kernel.org,
sparclinux@...r.kernel.org, x86@...nel.org, ardb@...nel.org,
Jason@...c4.com, torvalds@...ux-foundation.org
Subject: Re: [PATCH 07/16] crypto: sha512 - replace sha512_generic with
wrapper around SHA-512 library
On Wed, Jun 11, 2025 at 11:46:47AM +0800, Herbert Xu wrote:
> On Tue, Jun 10, 2025 at 08:39:57PM -0700, Eric Biggers wrote:
> >
> > Do you have a concrete example (meaning, a specific driver) where this actually
> > matters? Historically, export and import have always had to be paired for the
> > same transformation object, i.e. import was called only with the output of
> > export. There is, and has never been, any test that tests otherwise. This
> > seems like a brand new "requirement" that you've made up unnecessarily.
>
> It's not just drivers that may be using fallbacks, the ahash API
> code itself now relies on this to provide fallbacks for cases that
> drivers can't handle, such as linear addresses.
>
> I did add the testing for it, which revealed a few problems with
> s390 so it was reverted for 6.16. But I will be adding it back
> after the s390 issues have been resolved.
Okay, so it sounds like in practice this is specific to ahash_do_req_chain()
which you recently added. I'm not sure what it's meant to be doing.
> > I'll add export and import functions if you insist, but it seems pointless.
> >
> > Could you at least provide proper definitions for the legacy structs so that I
> > don't have to do pointer arithmetic to generate them?
>
> Just expose the sha512 block functions and use them as is. There
> is no need to do the export/import dance.
We're not going to support direct access to the SHA-512 compression function as
part of the library API. It's just unnecessary and error-prone. crypto/ will
just use the same well-documented and well-tested public API as everyone else.
- Eric
Powered by blists - more mailing lists