Re: [PATCH 2/4] crypto: drbg wait for crypto op not signal safe

2017-05-18 Thread Gilad Ben-Yossef
On Thu, May 18, 2017 at 8:09 AM, Herbert Xu wrote: > On Thu, May 11, 2017 at 02:53:43PM +0300, Gilad Ben-Yossef wrote: >> drbg_kcapi_sym_ctr() was using wait_for_completion_interruptible() to >> wait for completion of async crypto op but if a signal occurs it >> may return before DMA ops of HW cry

Re: [PATCH 2/4] crypto: drbg wait for crypto op not signal safe

2017-05-17 Thread Herbert Xu
On Thu, May 11, 2017 at 02:53:43PM +0300, Gilad Ben-Yossef wrote: > drbg_kcapi_sym_ctr() was using wait_for_completion_interruptible() to > wait for completion of async crypto op but if a signal occurs it > may return before DMA ops of HW crypto provider finish, thus > corrupting the output buffer.

Re: [PATCH 2/4] crypto: drbg wait for crypto op not signal safe

2017-05-16 Thread Eric Biggers
Hi Gilad, On Thu, May 11, 2017 at 02:53:43PM +0300, Gilad Ben-Yossef wrote: > drbg_kcapi_sym_ctr() was using wait_for_completion_interruptible() to > wait for completion of async crypto op but if a signal occurs it > may return before DMA ops of HW crypto provider finish, thus > corrupting the out

[PATCH 2/4] crypto: drbg wait for crypto op not signal safe

2017-05-11 Thread Gilad Ben-Yossef
drbg_kcapi_sym_ctr() was using wait_for_completion_interruptible() to wait for completion of async crypto op but if a signal occurs it may return before DMA ops of HW crypto provider finish, thus corrupting the output buffer. Resolve this by using wait_for_completion() instead. Reported-by: Eric