alistair23-linux/drivers/crypto
Jonas Eymann 89d124cb61 crypto: talitos - fix crash in talitos_cra_init()
Conversion of talitos driver to the new AEAD interface
hasn't been properly tested.

AEAD algorithms crash in talitos_cra_init as follows:

[...]
[    1.141095] talitos ffe30000.crypto: hwrng
[    1.145381] Unable to handle kernel paging request for data at address 0x00000058
[    1.152913] Faulting instruction address: 0xc02accc0
[    1.157910] Oops: Kernel access of bad area, sig: 11 [#1]
[    1.163315] SMP NR_CPUS=2 P1020 RDB
[    1.166810] Modules linked in:
[    1.169875] CPU: 0 PID: 1007 Comm: cryptomgr_test Not tainted 4.4.6 #1
[    1.176415] task: db5ec200 ti: db4d6000 task.ti: db4d6000
[    1.181821] NIP: c02accc0 LR: c02acd18 CTR: c02acd04
[    1.186793] REGS: db4d7d30 TRAP: 0300   Not tainted  (4.4.6)
[    1.192457] MSR: 00029000 <CE,EE,ME>  CR: 95009359  XER: e0000000
[    1.198585] DEAR: 00000058 ESR: 00000000
GPR00: c017bdc0 db4d7de0 db5ec200 df424b48 00000000 00000000 df424bfc db75a600
GPR08: df424b48 00000000 db75a628 db4d6000 00000149 00000000 c0044cac db5acda0
GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000400 df424940
GPR24: df424900 00003083 00000400 c0180000 db75a640 c03e9f84 df424b40 df424b48
[    1.230978] NIP [c02accc0] talitos_cra_init+0x28/0x6c
[    1.236039] LR [c02acd18] talitos_cra_init_aead+0x14/0x28
[    1.241443] Call Trace:
[    1.243894] [db4d7de0] [c03e9f84] 0xc03e9f84 (unreliable)
[    1.249322] [db4d7df0] [c017bdc0] crypto_create_tfm+0x5c/0xf0
[    1.255083] [db4d7e10] [c017beec] crypto_alloc_tfm+0x98/0xf8
[    1.260769] [db4d7e40] [c0186a20] alg_test_aead+0x28/0xc8
[    1.266181] [db4d7e60] [c0186718] alg_test+0x260/0x2e0
[    1.271333] [db4d7ee0] [c0183860] cryptomgr_test+0x30/0x54
[    1.276843] [db4d7ef0] [c0044d80] kthread+0xd4/0xd8
[    1.281741] [db4d7f40] [c000e4a4] ret_from_kernel_thread+0x5c/0x64
[    1.287930] Instruction dump:
[    1.290902] 38600000 4e800020 81230028 7c681b78 81490010 38e9ffc0 3929ffe8 554a073e
[    1.298691] 2b8a000a 7d474f9e 812a0008 91230030 <80e90058> 39270060 7c0004ac 7cc04828

Cc: <stable@vger.kernel.org> # 4.3+
Fixes: aeb4c132f3 ("crypto: talitos - Convert to new AEAD interface")
Signed-off-by: Jonas Eymann <J.Eymann@gmx.net>

Fix typo - replaced parameter of __crypto_ahash_alg(): s/tfm/alg
Remove checkpatch warnings.
Add commit message.

Signed-off-by: Horia Geant? <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2016-04-20 17:42:48 +08:00
..
amcc crypto: amcc - check return value of sg_nents_for_len 2015-11-17 22:00:38 +08:00
caam crypto: caam - Staticize caam_jr_shutdown() 2016-02-17 04:07:52 +08:00
ccp crypto: ccp - Prevent information leakage on export 2016-04-15 22:13:56 +08:00
marvell Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-03-23 06:12:39 -07:00
nx Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2016-03-17 21:38:27 -07:00
qat crypto: qat - remove redundant arbiter configuration 2016-03-11 21:22:18 +08:00
qce crypto: qce - check return value of sg_nents_for_len 2015-11-17 22:00:36 +08:00
rockchip crypto: rockchip - add hash support for crypto engine in rk3288 2016-02-28 03:26:29 +08:00
sunxi-ss crypto: sunxi - don't print confusing data 2016-01-27 20:36:26 +08:00
ux500 crypto: ux500 - fix checks of error code returned by devm_ioremap_resource() 2016-03-11 21:19:20 +08:00
vmx powerpc updates for 4.5 2016-01-15 13:18:47 -08:00
atmel-aes-regs.h crypto: atmel-aes - add support to GCM mode 2015-12-23 18:19:58 +08:00
atmel-aes.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-03-17 11:22:54 -07:00
atmel-sha-regs.h crypto: atmel-sha - fix context switches 2016-01-25 22:42:07 +08:00
atmel-sha.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-03-17 11:22:54 -07:00
atmel-tdes-regs.h
atmel-tdes.c crypto: atmel - fix checks of error code returned by devm_ioremap_resource() 2016-03-11 21:19:19 +08:00
bfin_crc.c crypto: bfin_crc - replace sg_count by sg_nents 2015-09-21 23:05:53 +08:00
bfin_crc.h
geode-aes.c
geode-aes.h
hifn_795x.c crypto: hifn_795x, picoxcell - use ablkcipher_request_cast 2015-12-29 21:32:44 +08:00
img-hash.c crypto: img-hash - fix spelling mistake in dev_err error message 2015-08-04 17:41:31 +08:00
ixp4xx_crypto.c crypto: ixp4xx - Fix false lastlen uninitialised warning 2016-01-25 22:42:09 +08:00
Kconfig crypto: rockchip - add hash support for crypto engine in rk3288 2016-02-28 03:26:29 +08:00
Makefile crypto: rockchip - add crypto driver for rk3288 2015-11-27 21:19:32 +08:00
mv_cesa.c
mv_cesa.h
mxs-dcp.c
n2_asm.S
n2_core.c crypto: n2 - Use precalculated hash from headers 2015-12-22 20:43:37 +08:00
n2_core.h
omap-aes.c crypto: omap-aes - Support crypto engine framework 2016-02-01 22:27:04 +08:00
omap-des.c crypto: omap - Removed unused variable "err" 2015-12-17 16:42:13 +08:00
omap-sham.c crypto/omap-sham: remove an open coded access to ->page_link 2015-08-17 08:12:57 -06:00
padlock-aes.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-01-12 18:51:14 -08:00
padlock-sha.c x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros 2015-12-19 11:49:55 +01:00
picoxcell_crypto.c crypto: hifn_795x, picoxcell - use ablkcipher_request_cast 2015-12-29 21:32:44 +08:00
picoxcell_crypto_regs.h
s5p-sss.c crypto: s5p-sss - Use memcpy_toio for iomem annotated memory 2016-01-25 22:39:02 +08:00
sahara.c crypto: sahara - fill the statesize field 2016-02-06 15:33:29 +08:00
talitos.c crypto: talitos - fix crash in talitos_cra_init() 2016-04-20 17:42:48 +08:00
talitos.h crypto: talitos - add new crypto modes 2015-12-04 22:29:56 +08:00