AnsweredAssumed Answered

crash during caam async hash generation

Question asked by Markus Stockhausen on Jan 7, 2015
Latest reply on Jan 30, 2015 by Markus Stockhausen

Hi,

 

I'm trying to use the caamhash driver on a TP-Link WDR4900 v1 (e500v2 P1014).

Linux kernel is 3.10.49 and module loading works fine. But when I try to test an

async sha256 hash I get a crash dump.

 

I nailed it down to the following command in function  ahash_set_sh_desc() of

caamhash.c:

 

        /* Load data and write to result or context */

        ahash_append_load_str(desc, ctx->ctx_len);

 

        ctx->sh_desc_update_dma = dma_map_single(jrdev, desc, desc_bytes(desc), <<< CRASH HERE

                                                 DMA_TO_DEVICE);

 

dmesg shows:

 

[   76.672773] platform ffe31000.jr: failed to flush job ring 0

[   76.684773] platform ffe32000.jr: failed to flush job ring 1

[   76.696765] platform ffe33000.jr: failed to flush job ring 2

[   76.708772] platform ffe34000.jr: failed to flush job ring 3

[   76.715288] caam ffe30000.crypto: device ID = 0x0a14010000000000 (Era 3)

[   76.722023] caam ffe30000.crypto: job rings = 4, qi = 0

[   76.797922] testing speed of async sha256

[   76.817173] Unable to handle kernel paging request for data at address 0x00000010

[   76.824655] Faulting instruction address: 0xc98b04a8

[   76.829620] Oops: Kernel access of bad area, sig: 11 [#1]

[   76.835009] Freescale P1014

[   76.837794] Modules linked in: tcrypt(+) caamhash caam ath9k ath9k_common pppoe ppp_async iptable_nat ath9k_hw ath pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv4 mac80211 ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_id xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_CT slhc nf_nat_irc nf_nat_ftp nf_nat nf_defrag_ipv4 nf_conntrack_irc nf_conntrack_ftp iptable_raw iptable_mangle iptable_filter ipt_REJECT ip_tables gpio_keys crc_ccitt compat booke_wdt ip6t_REJECT ip6table_raw ip6table_mangle ip6table_filter ip6_tables x_tables nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 dm_crypt dm_mirror dm_region_hash dm_log dm_mod ipv6 algif_skcipher algif_hash af_alg md5 arc4 crypto_blkcipher crypto_hash leds_gpio ehci_platform ehci_hcd fsl_mph_dr_of button_hotplug input_core usbcore nls_base usb_common

[   76.913294] CPU: 0 PID: 2641 Comm: insmod Not tainted 3.10.49 #3

[   76.919293] task: c46b9860 ti: c46e8000 task.ti: c46e8000

[   76.924683] NIP: c98b04a8 LR: c98b0478 CTR: c016f074

[   76.929639] REGS: c46e9bc0 TRAP: 0300   Not tainted  (3.10.49)

[   76.935460] MSR: 00029000 <CE,EE,ME>  CR: 40002082  XER: 20000000

[   76.941558] DEAR: 00000010, ESR: 00000000

[   76.945557]

[   76.945557] GPR00: c98b0478 c46e9c70 c46b9860 0000001e c901c501 c0310000 00000018 c0317b7c

[   76.945557] GPR08: 00000000 00000000 00000000 00000115 00000000 1001aae0 0000fff2 0000fff1

[   76.945557] GPR16: c0057b8c 00000000 00000124 000004b0 0000001e c0317800 c98e4904 c4c0a690

[   76.945557] GPR24: c98e4054 00000000 00000020 00000000 c0330000 c4a26610 c469a05c c469a000

[   76.975255] NIP [c98b04a8] 0xc98b04a8

[   76.978909] LR [c98b0478] 0xc98b0478

[   76.982474] Call Trace:

[   76.984914] [c46e9c70] [c98b0478] 0xc98b0478 (unreliable)

[   76.990319] [c46e9cb0] [c01152d8] crypto_create_tfm+0x88/0xd4

[   76.996061] [c46e9cd0] [c01153b8] crypto_alloc_tfm+0x94/0xe4

[   77.001717] [c46e9d00] [c98dfc18] init_module+0x25c18/0x28988 [tcrypt]

[   77.008239] [c46e9dc0] [c98e1cf8] init_module+0x27cf8/0x28988 [tcrypt]

[   77.014761] [c46e9de0] [c98ba084] init_module+0x84/0x138 [tcrypt]

[   77.020851] [c46e9e00] [c00021b4] do_one_initcall+0xe0/0x1a0

[   77.026512] [c46e9e30] [c005a730] load_module+0x18ac/0x1cc0

[   77.032079] [c46e9ee0] [c005ac3c] SyS_init_module+0xf8/0x10c

[   77.037734] [c46e9f40] [c000c23c] ret_from_syscall+0x0/0x3c

[   77.043312] --- Exception: c01 at 0x48061aa8

[   77.043312]     LR = 0x10001a10

[   77.050699] Instruction dump:

[   77.053659] 80df005c 7fa90034 5529d97e 2e090000 54c615fa 4092000c 813d0080 48000008

[   77.061413] 39200000 39400000 0f0a0000 3f80c033 <81290010> 815cc1d8 3c9e4000 5484c9f4

[   77.069342] ---[ end trace fba9b540001cbc0b ]---

[   77.073949]

 

Can anybody give an advise where to search next?

 

Thanks in advance.

 

Markus

Outcomes