linux/drivers/crypto
Horia Geanta bbf9c8934b crypto: caam - fix aead sglen for case 'dst != src'
For aead case when source and destination buffers are different,
there is an incorrect assumption that the source length includes the ICV
length. Fix this, since it leads to an oops when using sg_count() to
find the number of nents in the scatterlist:

Unable to handle kernel paging request for data at address 0x00000004
Faulting instruction address: 0xf91f7634
Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=8 P4080 DS
Modules linked in: caamalg(+) caam_jr caam
CPU: 1 PID: 1053 Comm: cryptomgr_test Not tainted 3.11.0 #16
task: eeb24ab0 ti: eeafa000 task.ti: eeafa000
NIP: f91f7634 LR: f91f7f24 CTR: f91f7ef0
REGS: eeafbbc0 TRAP: 0300   Not tainted  (3.11.0)
MSR: 00029002 <CE,EE,ME>  CR: 44044044  XER: 00000000
DEAR: 00000004, ESR: 00000000

GPR00: f91f7f24 eeafbc70 eeb24ab0 00000002 ee8e0900 ee8e0800 00000024 c45c4462
GPR08: 00000010 00000000 00000014 0c0e4000 24044044 00000000 00000000 c0691590
GPR16: eeab0000 eeb23000 00000000 00000000 00000000 00000001 00000001 eeafbcc8
GPR24: 000000d1 00000010 ee2d5000 ee49ea10 ee49ea10 ee46f640 ee46f640 c0691590
NIP [f91f7634] aead_edesc_alloc.constprop.14+0x144/0x780 [caamalg]
LR [f91f7f24] aead_encrypt+0x34/0x288 [caamalg]
Call Trace:
[eeafbc70] [a1004000] 0xa1004000 (unreliable)
[eeafbcc0] [f91f7f24] aead_encrypt+0x34/0x288 [caamalg]
[eeafbcf0] [c020d77c] __test_aead+0x3ec/0xe20
[eeafbe20] [c020f35c] test_aead+0x6c/0xe0
[eeafbe40] [c020f420] alg_test_aead+0x50/0xd0
[eeafbe60] [c020e5e4] alg_test+0x114/0x2e0
[eeafbee0] [c020bd1c] cryptomgr_test+0x4c/0x60
[eeafbef0] [c0047058] kthread+0xa8/0xb0
[eeafbf40] [c000eb0c] ret_from_kernel_thread+0x5c/0x64
Instruction dump:
69084321 7d080034 5508d97e 69080001 0f080000 81290024 552807fe 0f080000
3a600001 5529003a 2f8a0000 40dd0028 <80e90004> 3ab50001 8109000c 70e30002
---[ end trace b3c3e23925c7484e ]---

While here, add a tcrypt mode for making it easy to test authenc
(needed for triggering case above).

Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-11-28 22:25:17 +08:00
..
amcc powerpc: add missing explicit OF includes for ppc 2013-11-11 09:10:50 -06:00
caam crypto: caam - fix aead sglen for case 'dst != src' 2013-11-28 22:25:17 +08:00
nx crypto: nx - fix SHA-2 for chunks bigger than block size 2013-09-02 20:32:56 +10:00
ux500 crypto: ux500 - Fix logging, make arrays const, neatening 2013-08-01 10:53:59 +10: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 - add support for latest release of the IP (0x130) 2013-03-10 16:46:42 +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 - add support for latest release of the IP (0x410) 2013-03-10 16:46:42 +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 - add support for latest release of the IP (0x700) 2013-03-10 16:46:42 +08:00
bfin_crc.c crypto: bfin_crc - Fix possible NULL pointer dereference 2013-03-10 16:46:43 +08:00
dcp.c crypto: dcp - Check the return value from devm_ioremap_resource() 2013-10-07 14:16:54 +08:00
geode-aes.c Drivers: crypto: remove __dev* attributes. 2013-01-03 15:57:02 -08:00
geode-aes.h
hifn_795x.c crypto: hifn_795x - Pass correct pointer to free_irq() 2013-05-28 15:43:04 +08:00
ixp4xx_crypto.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2013-11-23 16:18:25 -08:00
Kconfig crypto: omap-aes - Kconfig: Add build support for AM437x 2013-08-21 21:28:06 +10:00
Makefile crypto: dcp - Added support for Freescale's DCP co-processor 2013-05-28 15:43:03 +08:00
mv_cesa.c crypto: mv_cesa: remove deprecated IRQF_DISABLED 2013-10-16 20:56:24 +08:00
mv_cesa.h crypto: mv_cesa - Add sha1 and hmac(sha1) async hash drivers 2010-04-13 16:50:49 +08:00
n2_asm.S crypto: n2 - Add Niagara2 crypto driver 2010-05-19 14:14:04 +10:00
n2_core.c Drivers: crypto: remove __dev* attributes. 2013-01-03 15:57:02 -08: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 CTR mode counter length 2013-10-30 12:02:59 +08:00
omap-sham.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2013-11-23 16:18:25 -08:00
padlock-aes.c crypto: drivers - remove cra_list initialization 2012-08-01 17:47:28 +08:00
padlock-sha.c crypto: Add support for x86 cpuid auto loading for x86 crypto drivers 2012-01-26 16:48:10 -08:00
picoxcell_crypto.c crypto: picoxcell - Simplify and harden key parsing 2013-10-16 20:56:26 +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: Remove redundant platform_set_drvdata() 2013-05-24 17:55:28 +08:00
sahara.c crypto: sahara - Remove redundant of_match_ptr 2013-10-07 14:17:07 +08:00
talitos.c crypto: talitos - corrrectly handle zero-length assoc data 2013-11-28 22:25:16 +08:00
talitos.h crypto: talitos - add sha224, sha384 and sha512 to existing AEAD algorithms 2012-07-11 11:08:29 +08:00
tegra-aes.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2013-11-23 16:18:25 -08:00
tegra-aes.h crypto: driver for Tegra AES hardware 2012-01-13 16:38:37 +11:00