Re: [QUESTION] hash import and request initialization

2017-12-26 Thread Gilad Ben-Yossef
On Wed, Dec 27, 2017 at 5:35 AM, Herbert Xu wrote: > On Tue, Dec 26, 2017 at 02:21:53PM +0200, Gilad Ben-Yossef wrote: >> >> See how SKCIPHER_REQUEST_ON_STACK is being used with an asymmetric skcipher >> in drivers/md/dm-integrity.c > > That's just broken. SKCIPHER_REQUEST_ON_STACK is only meant

Re: [QUESTION] hash import and request initialization

2017-12-26 Thread Herbert Xu
On Tue, Dec 26, 2017 at 02:21:53PM +0200, Gilad Ben-Yossef wrote: > > See how SKCIPHER_REQUEST_ON_STACK is being used with an asymmetric skcipher > in drivers/md/dm-integrity.c That's just broken. SKCIPHER_REQUEST_ON_STACK is only meant for sync algorithms and this code needs to be changed to ei

Re: [QUESTION] hash import and request initialization

2017-12-26 Thread Gilad Ben-Yossef
On Tue, Dec 26, 2017 at 12:40 PM, Herbert Xu wrote: > On Tue, Dec 26, 2017 at 11:06:02AM +0200, Gilad Ben-Yossef wrote: >> >> The hash state needs to be DMAed in and out of the hardware on each operation >> and I have no guarantee that the ahash request is allocated from DMAable >> memory >> (i.e

Re: [QUESTION] hash import and request initialization

2017-12-26 Thread Herbert Xu
On Tue, Dec 26, 2017 at 11:06:02AM +0200, Gilad Ben-Yossef wrote: > > The hash state needs to be DMAed in and out of the hardware on each operation > and I have no guarantee that the ahash request is allocated from DMAable > memory > (i.e. AHASH_REQUEST_ON_STACK). AHASH_REQUEST_ON_STACK cannot po

Re: [QUESTION] hash import and request initialization

2017-12-26 Thread Gilad Ben-Yossef
On Tue, Dec 26, 2017 at 5:07 AM, Herbert Xu wrote: > On Mon, Dec 25, 2017 at 10:07:54AM +0200, Gilad Ben-Yossef wrote: >> 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 pre

Re: [QUESTION] hash import and request initialization

2017-12-25 Thread Herbert Xu
On Mon, Dec 25, 2017 at 10:07:54AM +0200, Gilad Ben-Yossef wrote: > 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 se