mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Clarification of allowed context for crypto routines
@ 2009-01-23 19:29 Andrey Borzenkov
  2009-01-23 22:31 ` Herbert Xu
  0 siblings, 1 reply; 6+ messages in thread
From: Andrey Borzenkov @ 2009-01-23 19:29 UTC (permalink / raw)
  To: linux-crypto; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

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 #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-28  3:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-23 19:29 Clarification of allowed context for crypto routines Andrey Borzenkov
2009-01-23 22:31 ` Herbert Xu
2009-01-24  5:15   ` Andrey Borzenkov
2009-01-24  9:32     ` Herbert Xu
2009-01-27 18:01       ` Andrey Borzenkov
2009-01-28  3:08         ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome