lkml.org 
[lkml]   [2009]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Clarification of allowed context for crypto routines
Date
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 :)
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2009-01-27 19:05    [W:0.103 / U:1.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site