[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200901272101.20190.arvidjaar@mail.ru>
Date: Tue, 27 Jan 2009 21:01:13 +0300
From: Andrey Borzenkov <arvidjaar@...l.ru>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Clarification of allowed context for crypto routines
On 24 января 2009 12:32:45 Herbert Xu wrote:
> Andrey Borzenkov <arvidjaar@...l.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 :)
Download attachment "signature.asc " of type "application/pgp-signature" (198 bytes)
Powered by blists - more mailing lists