Thread (28 messages) flat view 28 messages, 2 authors, 2016-09-15

[PATCHv3 03/11] crypto: omap-sham: implement context export/import APIs

From: Tero Kristo <hidden>
Date: 2016-09-01 06:56:46
Also in: linux-crypto, linux-omap

On 01/09/16 09:16, Herbert Xu wrote:
On Thu, Sep 01, 2016 at 09:12:59AM +0300, Tero Kristo wrote:
quoted
Well, but the driver doesn't flush its buffers automatically, it
caches data until it has sufficient amount available. So, assuming
you want to do this:

sham_init
  sham_update 256 bytes
  sham_update 256 bytes
  wait until two above updates are complete
  sham_export

... the execution hangs at the wait phase as the driver is still
Well that's a bug in the driver.  While it's not illegal to wait
for more data, it's usually unnecessary.  Because we instead try
to get our users to generate as big a request as possible, e.g.,
one packet for IPsec.

If you really have to do the hold thing, then you must install a
timer like sha1-mb does on x86 to do the flush.

In any case, the completion function must not be called until
you're actually complete.
Hmm, looking at the driver, sham_update returns 0 immediately if it just 
caches data. In a sense, the update is not completed at this point. Are 
you saying this is illegal and can't be done?

 From my understanding, valid results are expected from the driver only 
after ->final is called.

-Tero
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help