[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6758312f.df0a0220.100594.1c3a@mx.google.com>
Date: Tue, 10 Dec 2024 13:16:42 +0100
From: Christian Marangi <ansuelsmth@...il.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: "David S. Miller" <davem@...emloft.net>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Antoine Tenart <atenart@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>, Boqun Feng <boqun.feng@...il.com>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>, linux-crypto@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, upstream@...oha.com,
Richard van Schagen <vschagen@...oud.com>
Subject: Re: [PATCH v7 3/3] crypto: Add Inside Secure SafeXcel EIP-93 crypto
engine support
On Tue, Dec 10, 2024 at 08:06:32PM +0800, Herbert Xu wrote:
> On Tue, Dec 10, 2024 at 12:55:02PM +0100, Christian Marangi wrote:
> >
> > The main problem here is that .update only enqueue packet to be
> > processed and we don't wait for it to finish as that would result in
> > really bad performance.
>
> You can return from update prior to finishing the hash. However,
> you must return -EINPROGRESS in that case.
>
> Once the hash has completed then you must export the hash state
> from the hardware into the request object, and then invoke the
> callback to inform the user that the update has finished.
>
> At that point, the user may call export.
>
> The user cannot call export prior to the update completing.
>
Oh! Ok, that is neat. Just to make sure everything is clear,
to complete the request it's the same used for final, the
ahash_request_complete(). I tought the -EINPROGRESS,
ahash_request_complete() pattern was only for final.
With the following implementation this is totally ok. Thanks for the
clarification on this.
--
Ansuel
Powered by blists - more mailing lists