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:
quoted
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.
quoted
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