Re: [RFC PATCH] crypto: caam - fix signals handling

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

 



On Fri, Jul 07, 2017 at 04:57:06PM +0300, Horia Geantă wrote:
> Driver does not properly handle the case when signals interrupt
> wait_for_completion_interruptible():
> -it does not check for return value
> -completion structure is allocated on stack; in case a signal interrupts
> the sleep, it will go out of scope, causing the worker thread
> (caam_jr_dequeue) to fail when it accesses it
> 
> wait_for_completion_interruptible() is replaced with uninterruptable
> wait_for_completion().
> We choose to block all signals while waiting for I/O (device executing
> the split key generation job descriptor) since the alternative - in
> order to have a deterministic device state - would be to flush the job
> ring (aborting *all* in-progress jobs).
> 
> Cc: <stable@xxxxxxxxxxxxxxx>
> Fixes: 045e36780f115 ("crypto: caam - ahash hmac support")
> Fixes: 4c1ec1f930154 ("crypto: caam - refactor key_gen, sg")
> Signed-off-by: Horia Geantă <horia.geanta@xxxxxxx>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



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

  Powered by Linux