linux/drivers/crypto/caam
Horia Geanta ef62b2310b crypto: caam - fix DMA direction mismatch in ahash_done_ctx_dst
caam_jr ffe301000.jr: DMA-API: device driver frees DMA memory with different direction [device address=0x00000000062ad1ac] [size=28 bytes] [mapped with DMA_FROM_DEVICE] [unmapped with DMA_TO_DEVICE]
------------[ cut here ]------------
WARNING: at lib/dma-debug.c:1131
Modules linked in: caamhash(+) [last unloaded: caamhash]
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W     3.16.0-rc1 #23
task: c0789380 ti: effd2000 task.ti: c07d6000
NIP: c02885cc LR: c02885cc CTR: c02d7020
REGS: effd3d50 TRAP: 0700   Tainted: G        W      (3.16.0-rc1)
MSR: 00021002 <CE,ME>  CR: 44048082  XER: 00000000

GPR00: c02885cc effd3e00 c0789380 000000c6 c1de3478 c1de382c 00000000 00021002
GPR08: 00000007 00000000 01660000 0000012f 84048082 00000000 00000018 c07db080
GPR16: 00000006 00000100 0000002c eee567e0 c07e1e10 c0da1180 00029002 c0d96708
GPR24: c07a0000 c07a4acc effd3e58 ee29b140 0000001c ee130210 00000000 c0d96700
NIP [c02885cc] check_unmap+0x47c/0xab0
LR [c02885cc] check_unmap+0x47c/0xab0
Call Trace:
[effd3e00] [c02885cc] check_unmap+0x47c/0xab0 (unreliable)
[effd3e50] [c0288c78] debug_dma_unmap_page+0x78/0x90
[effd3ed0] [f9350974] ahash_done_ctx_dst+0xa4/0x200 [caamhash]
[effd3f00] [c0429640] caam_jr_dequeue+0x1c0/0x280
[effd3f50] [c002c94c] tasklet_action+0xcc/0x1a0
[effd3f80] [c002cb30] __do_softirq+0x110/0x220
[effd3fe0] [c002cf34] irq_exit+0xa4/0xe0
[effd3ff0] [c000d834] call_do_irq+0x24/0x3c
[c07d7d50] [c000489c] do_IRQ+0x8c/0x110
[c07d7d70] [c000f86c] ret_from_except+0x0/0x18
--- Exception: 501 at _raw_spin_unlock_irq+0x30/0x50
    LR = _raw_spin_unlock_irq+0x2c/0x50
[c07d7e40] [c0053084] finish_task_switch+0x74/0x130
[c07d7e60] [c058f278] __schedule+0x238/0x620
[c07d7f70] [c058fb50] schedule_preempt_disabled+0x10/0x20
[c07d7f80] [c00686a0] cpu_startup_entry+0x100/0x1b0
[c07d7fb0] [c074793c] start_kernel+0x338/0x34c
[c07d7ff0] [c00003d8] set_ivor+0x140/0x17c
Instruction dump:
7d495214 7d294214 806a0010 80c90010 811a001c 813a0020 815a0024 90610008
3c60c06d 90c1000c 3863f764 4830d131 <0fe00000> 3c60c06d 3863f0f4 4830d121
---[ end trace db1fae088c75c270 ]---
Mapped at:
 [<f9352454>] ahash_update_first+0x5b4/0xba0 [caamhash]
 [<c022ff28>] __test_hash+0x288/0x6c0
 [<c0230388>] test_hash+0x28/0xb0
 [<c02304a4>] alg_test_hash+0x94/0xc0
 [<c022fa94>] alg_test+0x114/0x2e0

Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2014-07-23 21:31:35 +08:00
..
Kconfig crypto: caam - Add Platform driver for Job Ring 2013-10-30 12:02:57 +08:00
Makefile crypto: caam - Add Platform driver for Job Ring 2013-10-30 12:02:57 +08:00
caamalg.c crypto: caam - fix "failed to check map error" DMA warnings 2014-07-23 21:28:43 +08:00
caamhash.c crypto: caam - fix DMA direction mismatch in ahash_done_ctx_dst 2014-07-23 21:31:35 +08:00
caamrng.c crypto: caam - fix "failed to check map error" DMA warnings 2014-07-23 21:28:43 +08:00
compat.h crypto: caam - add support for aead null encryption 2014-03-21 21:54:27 +08:00
ctrl.c crypto: caam - set coherent_dma_mask 2014-07-23 21:28:42 +08:00
ctrl.h crypto: caam - fix ERA retrieval function 2014-02-09 09:59:27 +08:00
desc.h crypto: caam - remove duplicate FIFOST_CONT_MASK define 2014-06-20 21:27:57 +08:00
desc_constr.h crypto: caam - add support for aead null encryption 2014-03-21 21:54:27 +08:00
error.c crypto: caam - Fix the 'quoted string split across lines' 2014-05-08 21:58:11 +08:00
error.h crypto: caam - Contain caam_jr_strstatus() ugliness 2014-05-08 21:58:06 +08:00
intern.h crypto: caam - Configuration for platforms with virtualization enabled in CAAM 2014-06-25 21:38:39 +08:00
jr.c crypto: caam - set coherent_dma_mask 2014-07-23 21:28:42 +08:00
jr.h crypto: caam - Add API's to allocate/free Job Rings 2013-10-30 12:02:57 +08:00
key_gen.c crypto: caam - Contain caam_jr_strstatus() ugliness 2014-05-08 21:58:06 +08:00
key_gen.h crypto: caam - change key gen functions to return signed int 2013-04-25 21:01:43 +08:00
pdb.h crypto: caam - Add define for Adjust Output Frame Length in PDB 2013-05-28 15:37:08 +08:00
regs.h crypto: caam - Add definition of rd/wr_reg64 for little endian platform 2014-06-25 21:38:40 +08:00
sg_sw_sec4.h crypto: caam - map src buffer before access 2013-09-24 06:02:20 +10:00