linux/drivers/crypto/amcc
Christian Lamparter 658c9d2b9f crypto: crypto4xx - put temporary dst sg into request ctx
This patch fixes a crash that happens when testing rfc4543(gcm(aes))

Unable to handle kernel paging request for data at address 0xf59b3420
Faulting instruction address: 0xc0012994
Oops: Kernel access of bad area, sig: 11 [#1]
BE PowerPC 44x Platform
Modules linked in: tcrypt(+) crypto4xx [...]
CPU: 0 PID: 0 Comm: swapper Tainted: G           O      4.17.0-rc1+ #23
NIP:  c0012994 LR: d3077934 CTR: 06026d49
REGS: cfff7e30 TRAP: 0300   Tainted: G           O       (4.17.0-rc1+)
MSR:  00029000 <CE,EE,ME>  CR: 44744822  XER: 00000000
DEAR: f59b3420 ESR: 00000000
NIP [c0012994] __dma_sync+0x58/0x10c
LR [d3077934] crypto4xx_bh_tasklet_cb+0x188/0x3c8 [crypto4xx]

__dma_sync was fed the temporary _dst that crypto4xx_build_pd()
had in it's function stack. This clearly never worked.
This patch therefore overhauls the code from the original driver
and puts the temporary dst sg list into aead's request context.

Fixes: a0aae821ba ("crypto: crypto4xx - prepare for AEAD support")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-04-28 16:09:45 +08:00
..
crypto4xx_alg.c crypto: crypto4xx - put temporary dst sg into request ctx 2018-04-28 16:09:45 +08:00
crypto4xx_core.c crypto: crypto4xx - put temporary dst sg into request ctx 2018-04-28 16:09:45 +08:00
crypto4xx_core.h crypto: crypto4xx - put temporary dst sg into request ctx 2018-04-28 16:09:45 +08:00
crypto4xx_reg_def.h crypto: crypto4xx - support Revision B parts 2018-01-05 18:43:03 +11:00
crypto4xx_sa.h crypto: crypto4xx - prepare for AEAD support 2017-10-12 22:55:19 +08:00
crypto4xx_trng.c crypto: crypto4xx - kill MODULE_NAME 2018-01-05 18:43:04 +11:00
crypto4xx_trng.h crypto4xx: integrate ppc4xx-rng into crypto4xx 2016-04-20 17:50:02 +08:00
Makefile crypto: crypto4xx - move and refactor dynamic_contents helpers 2017-09-22 17:43:18 +08:00