linux/drivers/crypto/caam
Horia Geantă 7459e1d25f crypto: caam - fix signals handling
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@vger.kernel.org>
Fixes: 045e36780f ("crypto: caam - ahash hmac support")
Fixes: 4c1ec1f930 ("crypto: caam - refactor key_gen, sg")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-07-12 18:38:04 +08:00
..
caamalg_desc.c crypto: caam/qi - add ablkcipher and authenc algorithms 2017-03-24 22:02:59 +08:00
caamalg_desc.h crypto: caam/qi - add ablkcipher and authenc algorithms 2017-03-24 22:02:59 +08:00
caamalg_qi.c crypto: caam - fix gfp allocation flags (part II) 2017-06-22 16:47:23 +08:00
caamalg.c crypto: caam - fix gfp allocation flags (part II) 2017-06-22 16:47:23 +08:00
caamhash.c crypto: caam - fix signals handling 2017-07-12 18:38:04 +08:00
caampkc.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-07-05 15:17:26 +08:00
caampkc.h crypto: caam - add support for RSA key form 3 2017-05-18 13:19:51 +08:00
caamrng.c crypto: caam - trivial code clean-up 2016-11-13 17:45:12 +08:00
compat.h crypto: caam - add support for RSA algorithm 2016-07-05 23:05:24 +08:00
ctrl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-04-05 21:57:07 +08:00
ctrl.h crypto: caam - fix ERA retrieval function 2014-02-09 09:59:27 +08:00
desc_constr.h crypto: caam - avoid double inclusion in desc_constr.h 2017-03-24 22:02:59 +08:00
desc.h crypto: caam - move sec4_sg_entry to sg_sw_sec4.h 2016-11-13 17:45:14 +08:00
error.c crypto: caam - don't include unneeded headers 2017-02-15 13:23:36 +08:00
error.h crypto: caam - Contain caam_jr_strstatus() ugliness 2014-05-08 21:58:06 +08:00
intern.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-04-05 21:57:07 +08:00
jr.c crypto: caam - make of_device_ids const. 2017-06-20 11:21:49 +08:00
jr.h crypto: caam - Add API's to allocate/free Job Rings 2013-10-30 12:02:57 +08:00
Kconfig crypto: caam/qi - add ablkcipher and authenc algorithms 2017-03-24 22:02:59 +08:00
key_gen.c crypto: caam - fix signals handling 2017-07-12 18:38:04 +08:00
key_gen.h crypto: caam - consolidate split key length computation 2016-11-28 21:23:23 +08:00
Makefile crypto: caam/qi - add ablkcipher and authenc algorithms 2017-03-24 22:02:59 +08:00
pdb.h crypto: caam - add support for RSA key form 3 2017-05-18 13:19:51 +08:00
pkc_desc.c crypto: caam - add support for RSA key form 3 2017-05-18 13:19:51 +08:00
qi.c crypto: caam - fix error return code in caam_qi_init() 2017-04-21 20:30:37 +08:00
qi.h crypto: caam - add Queue Interface (QI) backend support 2017-03-24 22:02:59 +08:00
regs.h crypto: caam - treat SGT address pointer as u64 2016-10-02 22:33:45 +08:00
sg_sw_qm.h crypto: caam/qi - add ablkcipher and authenc algorithms 2017-03-24 22:02:59 +08:00
sg_sw_sec4.h crypto: caam - replace sg_count() with sg_nents_for_len() 2017-02-15 13:23:39 +08:00