All of lore.kernel.org
 help / color / mirror / Atom feed
* crypto_shash_update & CRYPTO_TFM_REQ_MAY_SLEEP
@ 2010-02-03 17:21 Dmitry Kasatkin
  2010-02-09  7:41 ` Herbert Xu
  0 siblings, 1 reply; 11+ messages in thread
From: Dmitry Kasatkin @ 2010-02-03 17:21 UTC (permalink / raw)
  To: linux-crypto@vger.kernel.org

Hi,

One interesting issue

Many clients in the kernel set CRYPTO_TFM_REQ_MAY_SLEEP to desc.flags.
It is used by crypto_yeld().

But the flags also available in the driver.
One can assume that it is possible to sleep, but is not, because crypto
walk will
    walk->data = crypto_kmap(walk->pg, 0);

------------------
    for (nbytes = crypto_hash_walk_first_compat(hdesc, &walk, sg, len);
         nbytes > 0; nbytes = crypto_hash_walk_done(&walk, nbytes))
        nbytes = crypto_shash_update(desc, walk.data, nbytes);
------------------

That is quite confusing...
I would expect that driver could sleep while hw is doing calculation.

Seems most of the clients uses sync API (linux/net has only sync).

Any comments? Ideas?

Thanks.

- Dmitry


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-02-16  7:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-03 17:21 crypto_shash_update & CRYPTO_TFM_REQ_MAY_SLEEP Dmitry Kasatkin
2010-02-09  7:41 ` Herbert Xu
2010-02-09  8:45   ` Dmitry Kasatkin
2010-02-09  9:02     ` Herbert Xu
2010-02-10 12:16   ` Dmitry Kasatkin
2010-02-15 19:20     ` Dmitry Kasatkin
2010-02-16  0:44       ` Herbert Xu
2010-02-16  6:36         ` Dmitry Kasatkin
2010-02-16  6:58           ` Herbert Xu
2010-02-16  7:05             ` Dmitry Kasatkin
2010-02-16  7:27               ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.