Am Donnerstag, 31. März 2016, 17:21:06 schrieb Herbert Xu: Hi Herbert, > 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. Considering the implementation in ansi_cprng.c, is it allowed to use spin_lock_bh with the sync operations assuming that a cipher implementation may sleep? Thanks Stephan -- 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