linux/drivers/crypto/caam
Horia Geantă 42cfcafb91 crypto: caam - fix gfp allocation flags (part I)
Changes in the SW cts (ciphertext stealing) code in
commit 0605c41cc5 ("crypto: cts - Convert to skcipher")
revealed a problem in the CAAM driver:
when cts(cbc(aes)) is executed and cts runs in SW,
cbc(aes) is offloaded in CAAM; cts encrypts the last block
in atomic context and CAAM incorrectly decides to use GFP_KERNEL
for memory allocation.

Fix this by allowing GFP_KERNEL (sleeping) only when MAY_SLEEP flag is
set, i.e. remove MAY_BACKLOG flag.

We split the fix in two parts - first is sent to -stable, while the
second is not (since there is no known failure case).

Link: http://lkml.kernel.org/g/20170602122446.2427-1-david@sigma-star.at
Cc: <stable@vger.kernel.org> # 4.8+
Reported-by: David Gstir <david@sigma-star.at>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-06-22 16:47:22 +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/qi - add ablkcipher and authenc algorithms 2017-03-24 22:02:59 +08:00
caamalg.c crypto: caam - fix gfp allocation flags (part I) 2017-06-22 16:47:22 +08:00
caamhash.c crypto: caam - fix state buffer DMA (un)mapping 2017-02-15 13:23:43 +08:00
caampkc.c crypto: caam - fix invalid dereference in caam_rsa_init_tfm() 2017-04-05 21:20:16 +08:00
caampkc.h crypto: caam - add support for RSA algorithm 2016-07-05 23:05:24 +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 - check return code of dma_set_mask_and_coherent() 2017-02-15 13:23:37 +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 - consolidate split key length computation 2016-11-28 21:23:23 +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 algorithm 2016-07-05 23:05:24 +08:00
pkc_desc.c crypto: caam - add support for RSA algorithm 2016-07-05 23:05:24 +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