Re: Clarification of allowed context for crypto routines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24 января 2009 12:32:45 Herbert Xu wrote:
> Andrey Borzenkov <arvidjaar@xxxxxxx> 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: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux