Re: [PATCH] crypto: testmgr: don't allocate IV on stack

2017-10-31 Thread Herbert Xu
On Tue, Oct 31, 2017 at 09:05:57AM +, Horia Geantă wrote: > > > > The driver that is mapping the IV directly should be fixed instead. > > Only input that is given in the form of SG lists can be mapped. > > Everything else should be copied if they need to go over DMA. > > > Herbert, wouldn't

Re: [PATCH] crypto: testmgr: don't allocate IV on stack

2017-10-31 Thread Horia Geantă
On 10/31/2017 10:00 AM, Herbert Xu wrote: > On Tue, Oct 31, 2017 at 07:56:26AM +, Gilad Ben-Yossef wrote: >> The IV was allocated on the stack in testmgr skcipher tests. >> Since HW based tfm providers need to DMA the IV to the HW, >> this leads to problems and is detected by the DMA-API debug

Re: [PATCH] crypto: testmgr: don't allocate IV on stack

2017-10-31 Thread Gilad Ben-Yossef
On Tue, Oct 31, 2017 at 9:59 AM, Herbert Xu wrote: > On Tue, Oct 31, 2017 at 07:56:26AM +, Gilad Ben-Yossef wrote: >> The IV was allocated on the stack in testmgr skcipher tests. >> Since HW based tfm providers need to DMA the IV to the HW, >> this leads to

Re: [PATCH] crypto: testmgr: don't allocate IV on stack

2017-10-31 Thread Herbert Xu
On Tue, Oct 31, 2017 at 07:56:26AM +, Gilad Ben-Yossef wrote: > The IV was allocated on the stack in testmgr skcipher tests. > Since HW based tfm providers need to DMA the IV to the HW, > this leads to problems and is detected by the DMA-API debug > code. > > Fix it by allocating the IV using

[PATCH] crypto: testmgr: don't allocate IV on stack

2017-10-31 Thread Gilad Ben-Yossef
The IV was allocated on the stack in testmgr skcipher tests. Since HW based tfm providers need to DMA the IV to the HW, this leads to problems and is detected by the DMA-API debug code. Fix it by allocating the IV using kmalloc instead. Signed-off-by: Gilad Ben-Yossef ---