mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@mail.ru>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Clarification of allowed context for crypto routines
Date: Tue, 27 Jan 2009 21:01:13 +0300	[thread overview]
Message-ID: <200901272101.20190.arvidjaar@mail.ru> (raw)
In-Reply-To: <20090124093245.GA4889@gondor.apana.org.au>

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

On 24 января 2009 12:32:45 Herbert Xu wrote:
> Andrey Borzenkov <arvidjaar@mail.ru> wrote:
> > On 24 января 2009 01:31:50 Herbert Xu wrote:
> >> 2) The highmem primitives we use are currently softirq only.  We
> >> could make them work for hardirq as well, but because of 1) we
> >> didn't.
> >
> > Could you point to example of such primitive in code under crypto?
>
> Grep for kmap under crypto.
>

I checked and

- all usage is kmap_atomic; which implies it should be technically safe 
(not advisable) to use in interrupt context as well

- as far as I understand, if it could be kmap() that could sleep, it is 
unsafe to use in tasklet anyway?

Please bear with me. The problem with kernel is lack of any 
comprehensive documentation; so almost the only way to learn is by 
example - get code that is known to work and has at least /some/ 
documentation; and assume that what it does is correct. In this case 
incomplete or misleading documentation leads to adopting incorrect usage 
lately ... in this case I do not argue about code under crypto; but 
rather try to learn how and when I can safely use this code in my 
driver.

So I still miss difference between interrupt context and bottom half 
(i.e. tasklet) that is made in documentation. Sorry :)

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2009-01-27 18:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23 19:29 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 [this message]
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=200901272101.20190.arvidjaar@mail.ru \
    --to=arvidjaar@mail.ru \
    --cc=herbert@gondor.apana.org.au \
    --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