linux/drivers/crypto
Alex Porosanu e92d3649f8 crypto: caam - fix AEAD givenc descriptors
[ Upstream commit d128af1787 ]

The AEAD givenc descriptor relies on moving the IV through the
output FIFO and then back to the CTX2 for authentication. The
SEQ FIFO STORE could be scheduled before the data can be
read from OFIFO, especially since the SEQ FIFO LOAD needs
to wait for the SEQ FIFO LOAD SKIP to finish first. The
SKIP takes more time when the input is SG than when it's
a contiguous buffer. If the SEQ FIFO LOAD is not scheduled
before the STORE, the DECO will hang waiting for data
to be available in the OFIFO so it can be transferred to C2.
In order to overcome this, first force transfer of IV to C2
by starting the "cryptlen" transfer first and then starting to
store data from OFIFO to the output buffer.

Fixes: 1acebad3d8 ("crypto: caam - faster aead implementation")
Cc: <stable@vger.kernel.org> # 3.2+
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
History 2017-01-13 18:00:21 -05:00
..
amcc crypto: drivers - Add 2 missing __exit_p 2014-06-20 21:26:08 +08:00
caam crypto: caam - fix AEAD givenc descriptors 2017-01-13 18:00:21 -05:00
ccp crypto: ccp - Fix AES XTS error for request sizes above 4096 2016-06-18 16:52:51 -04:00
nx The branch contains the following device tree changes the v3.17 merge 2014-08-14 09:53:39 -06:00
qat crypto: qat - Fix invalid synchronization between register/unregister sym algs 2015-08-27 13:25:26 -04:00
qce Fix up missing dmaengine header inclusion from qce crypto engine 2014-10-08 05:23:02 -04:00
ux500 crypto: ux500 - memmove the right size 2016-07-11 11:16:08 -04:00
atmel-aes-regs.h crypto: atmel - add Atmel AES driver 2012-07-11 11:07:40 +08:00
atmel-aes.c crypto: atmel-aes - check alignment of cfb64 mode 2014-04-28 18:21:19 +08:00
atmel-sha-regs.h crypto: atmel-sha - add support for latest release of the IP (0x410) 2013-03-10 16:46:42 +08:00
atmel-sha.c crypto: atmel-sha - Switch to managed version of kzalloc 2014-08-01 22:36:12 +08:00
atmel-tdes-regs.h crypto: atmel-tdes - add support for latest release of the IP (0x700) 2013-03-10 16:46:42 +08:00
atmel-tdes.c crypto: atmel-tdes - Switch to managed version of kzalloc 2014-08-01 22:36:12 +08:00
bfin_crc.c cryptoo: bfin_crc - avoid get physical address of coherence memory by dma_map_single 2014-04-16 20:40:16 +08:00
bfin_crc.h crypto: bfin_crc - access crc registers by readl and writel functions 2014-04-16 20:40:15 +08:00
geode-aes.c crypto: geode - Don't use tfm->__crt_alg->cra_name directly 2014-05-22 21:03:13 +08:00
geode-aes.h crypto: geode - Consistently use AES_KEYSIZE_128 2014-05-22 21:03:12 +08:00
hifn_795x.c crypto: use pci_zalloc_consistent 2014-08-08 15:57:28 -07:00
ixp4xx_crypto.c crypto: ixp4xx - Remove bogus BUG_ON on scattered dst buffer 2015-08-27 13:25:27 -04:00
Kconfig crypto: qce - Let 'DEV_QCE' depend on both HAS_DMA and HAS_IOMEM 2014-07-23 21:31:37 +08:00
Makefile crypto: qce - Build Qualcomm crypto driver 2014-07-03 21:42:03 +08:00
mv_cesa.c crypto: LLVMLinux: Remove VLAIS from crypto/mv_cesa.c 2014-10-14 10:51:23 +02:00
mv_cesa.h crypto: mv_cesa - Add missing #define 2014-08-29 21:46:36 +08:00
mxs-dcp.c crypto: dcp - tfm->__crt_alg->cra_name directly 2014-05-22 21:03:15 +08:00
n2_asm.S crypto: n2 - Add Niagara2 crypto driver 2010-05-19 14:14:04 +10:00
n2_core.c crypto: LLVMLinux: Remove VLAIS from crypto/n2_core.c 2014-10-14 10:51:23 +02:00
n2_core.h crypto: n2 - Add Niagara2 crypto driver 2010-05-19 14:14:04 +10:00
omap-aes.c crypto: omap-aes - Fix support for unequal lengths 2015-05-17 19:12:28 -04:00
omap-des.c crypto: omap-des - handle error of pm_runtime_get_sync 2014-04-16 20:40:19 +08:00
omap-sham.c crypto: LLVMLinux: Remove VLAIS from crypto/omap_sham.c 2014-10-14 10:51:23 +02:00
padlock-aes.c crypto: prefix module autoloading with "crypto-" 2015-01-29 17:40:46 -08:00
padlock-sha.c crypto: prefix module autoloading with "crypto-" 2015-01-29 17:40:46 -08:00
picoxcell_crypto.c crypto: picoxcell - Use devm_ioremap_resource() 2014-02-27 05:56:47 +08:00
picoxcell_crypto_regs.h crypto: picoxcell - add support for the picoxcell crypto engines 2011-02-21 22:42:40 +11:00
s5p-sss.c crypto: s5p-sss - Fix missed interrupts when working with 8 kB blocks 2016-06-03 11:30:28 -04:00
sahara.c crypto: sahara - tfm->__crt_alg->cra_name directly 2014-05-22 21:03:16 +08:00
talitos.c Revert "crypto: talitos - convert to use be16_add_cpu()" 2015-07-03 23:02:16 -04:00
talitos.h crypto: talitos - add sha224, sha384 and sha512 to existing AEAD algorithms 2012-07-11 11:08:29 +08:00