On Thu, Mar 31, 2016 at 11:18:48AM +0200, Stephan Mueller wrote: > Hi Herbert, > > is it allowed that cipher implementations sleep? The driver of my question is > whether I can use spin_lock_irqsave() as a lock around a cipher operation. > > The cipher operations in question are hashing, HMACing and symmetric ciphers.
Whether they can sleep is controlled by the MAY_SLEEP flag. Of course, even if they can't sleep, if you invoke an async op then it may return -EINPROGRESS and continue the processing in the background. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html