crypto_shash_update & CRYPTO_TFM_REQ_MAY_SLEEP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux