mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@mail.ru>
To: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Clarification of allowed context for crypto routines
Date: Fri, 23 Jan 2009 22:29:46 +0300	[thread overview]
Message-ID: <200901232229.47885.arvidjaar@mail.ru> (raw)

[-- 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 --]

             reply	other threads:[~2009-01-23 19:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23 19:29 Andrey Borzenkov [this message]
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

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=200901232229.47885.arvidjaar@mail.ru \
    --to=arvidjaar@mail.ru \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@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

Powered by JetHome