Re: [PATCH v2 1/3] staging: ccree: copy IV to DMAable memory

2017-11-08 Thread Herbert Xu
On Wed, Nov 08, 2017 at 01:54:03PM +0200, Gilad Ben-Yossef wrote: > > As a HW based crypto driver maintainer I sympathize, but let's play > devil's advocate for a second here: > > In the current state, HW based crypto drivers need to allocate a buffer > and copy the IV, because they don't know if

Re: [PATCH v2 1/3] staging: ccree: copy IV to DMAable memory

2017-11-08 Thread Gilad Ben-Yossef
Hi, On Wed, Nov 8, 2017 at 12:26 PM, Horia Geantă wrote: > On 11/2/2017 10:14 AM, Gilad Ben-Yossef wrote: >> We are being passed an IV buffer from unknown origin, which may be >> stack allocated and thus not safe for DMA. Allocate a DMA safe >> buffer for the IV and use

Re: [PATCH v2 1/3] staging: ccree: copy IV to DMAable memory

2017-11-08 Thread Horia Geantă
On 11/2/2017 10:14 AM, Gilad Ben-Yossef wrote: > We are being passed an IV buffer from unknown origin, which may be > stack allocated and thus not safe for DMA. Allocate a DMA safe > buffer for the IV and use that instead. > IIUC this fixes only the (a)blkcipher / skcipher algorithms. What about

[PATCH v2 1/3] staging: ccree: copy IV to DMAable memory

2017-11-02 Thread Gilad Ben-Yossef
We are being passed an IV buffer from unknown origin, which may be stack allocated and thus not safe for DMA. Allocate a DMA safe buffer for the IV and use that instead. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c | 20 ++--