linux-xiaomi-chiron/drivers/crypto/caam
Iuliana Prodan b4e9e931e9 crypto: caam - fix copy of next buffer for xcbc and cmac
Fix a side effect of adding xcbc support, when the next_buffer is not
copied.
The issue occurs, when there is stored from previous state a blocksize
buffer and received, a less than blocksize, from user. In this case, the
nents for req->src is 0, and the next_buffer is not copied.
An example is:
{
	.tap	= { 17, 15, 8 },
	.psize	= 40,
	.np	= 3,
	.ksize	= 16,
}

Fixes: 12b8567f6f ("crypto: caam - add support for xcbc(aes)")
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-03-28 13:54:32 +08:00
..
caamalg.c
caamalg_desc.c
caamalg_desc.h
caamalg_qi.c
caamalg_qi2.c
caamalg_qi2.h
caamhash.c
caamhash_desc.c
caamhash_desc.h
caampkc.c
caampkc.h
caamrng.c
compat.h
ctrl.c
ctrl.h
desc.h
desc_constr.h
dpseci.c
dpseci.h
dpseci_cmd.h
error.c
error.h
intern.h
jr.c
jr.h
Kconfig
key_gen.c
key_gen.h
Makefile
pdb.h
pkc_desc.c
qi.c
qi.h
regs.h
sg_sw_qm.h
sg_sw_qm2.h
sg_sw_sec4.h