[QUESTION] hash import and request initialization

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

 



Hi there,

I have ran into something I am unsure about regarding the ccree driver
implementation and would love to get some guidance:

I have assumed, based on previous list correspondence, that both of
the following sequences are legal:

Scenario A
1. ahash_request_alloc
2. ahash_import

Scenario B
1. ahash_request_alloc
2. crypto_ahash_init
3. ahash_import

However, I've run into the problem that since ahash_request_alloc does
not zero the allocated request memory
and specifically does not zero the tfm specific context part of it, I
have no way to distinguish  between A and B and therefore
if I have any initialization sequence that needs to happen once per
request (DMA buffer allocation and mapping in my
case), I cannot tell if I need to do them in ahash_import callback or not.

The testmgr test uses scenario A, but this is nor here nor there.

So, am I'm missing something here or is the B scenario simply not legal?

Many thanks and Happy Xmas if this applies to you,
Gilad



-- 
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru



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

  Powered by Linux