Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
To: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Subject: crypto_shash_update & CRYPTO_TFM_REQ_MAY_SLEEP
Date: Wed, 03 Feb 2010 19:21:01 +0200	[thread overview]
Message-ID: <4B69B07D.9010909@nokia.com> (raw)

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


             reply	other threads:[~2010-02-03 17:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03 17:21 Dmitry Kasatkin [this message]
2010-02-09  7:41 ` crypto_shash_update & CRYPTO_TFM_REQ_MAY_SLEEP 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B69B07D.9010909@nokia.com \
    --to=dmitry.kasatkin@nokia.com \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox