Clarification of allowed context for crypto routines

From: Andrey Borzenkov
Date: Fri Jan 23 2009 - 14:30:09 EST


According to Documentation/crypto/api-intro.txt:

DEVELOPER NOTES

Transforms may only be allocated in user context, and cryptographic
methods may only be called from softirq and user contexts. For
transforms with a setkey method it too should only be called from
user context.

As I can understand, user context requirement is due to potential for
setkey to sleep (although it appears, that currently the only module
that can sleep is shash which is calling kmalloc with GFP_KERNEL). Is it
correct?

But where is the difference between hard and softirq contexts? I fail to
see any technical reason for this requirement.

Thank you!

-andrey

Attachment: signature.asc
Description: This is a digitally signed message part.