summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Liu <r64343@freescale.com>2013-07-19 12:43:18 +0800
committerTerry Lv <r65388@freescale.com>2013-07-25 12:46:07 +0800
commit5b402809af785fdd61f1597ac7eda930f1477d6a (patch)
tree3620327e7f4abe96647e42577f2be446f5eefec4
parentb734dcca3795481911bbcfd590f0ffca150edf1d (diff)
ENGR00255073 crypto: kernel dump when do crypto module speed test in single mode
when do the crypto module speed test in single mode, meet the following dump: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = 8c804000 [00000000] *pgd=1c84b831, *pte=00000000, *ppte=00000000 Internal error: Oops: 817 [#1] PREEMPT SMP Modules linked in: tcrypt(+) CPU: 0 Tainted: G W (3.0.35-02642-g3a18d11-dirty #92) PC is at __bug+0x1c/0x28 LR is at __bug+0x18/0x28 pc : [<80045390>] lr : [<8004538c>] psr: 60000013 sp : 8c925dd8 ip : a09b2000 fp : 881f8018 r10: 00000000 r9 : 881f8000 r8 : 8e5a0c08 r7 : 8c866840 r6 : 00000002 r5 : 00000010 r4 : 7f08bbe0 r3 : 00000000 r2 : 80ac9190 r1 : 80000093 r0 : 00000065 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 10c53c7d Table: 1c80404a DAC: 00000015 Process insmod (pid: 3994, stack limit = 0x8c9242f0) Stack: (0x8c925dd8 to 0x8c926000) 5dc0: 00000000 8004b548 5de0: 7f08bbe0 0f08bbe0 8db9a000 8c866840 8e5a0c08 803cd650 00000001 181f8038 5e00: 00000001 8db9a000 00000000 181f8038 881f8038 8b800000 00000010 1c866a70 5e20: 8db9a000 8db9a000 00000000 803cd26c 004eea5b 00000000 00000000 8db9a000 5e40: 8db9a000 80208db8 00000010 00000001 7f08b7b4 7f088b40 00000001 80aff320 5e60: 8e5330c0 80affe00 00000003 0000012c 8c866800 8c866840 00000000 00000000 5e80: 00000000 8c925e84 8c925e84 00000041 87654321 8b9c4be0 00000000 00001000 5ea0: 1c938000 87654321 8b9c4a0c 00000000 00001000 00000000 87654321 8b9bfd44 5ec0: 00000000 00001000 00000000 87654321 8b9c497e 00000000 00001000 00000000 5ee0: 7f08ba9c 7f08bbd0 7f08bbd0 000a7008 0000833c 80042284 7f08e000 8c924000 5f00: 00000000 7f08a3e0 7f08bbd0 000a7008 0000833c 00000010 7f08bbd0 000a7008 5f20: 0000833c 80042284 8c924000 7f08e06c 7f08ba90 00000000 000a7008 8003c588 5f40: 00000000 00000000 0000001f 00000020 00000017 00000014 00000012 00000000 5f60: 8c925f74 7f08ba90 00000000 000a7008 0000833c 80042284 8c924000 00000000 5f80: 00000000 800aae9c 8e4a6c80 800f307c 00000000 0000833c 7ee9adb4 7ee9aebf 5fa0: 00000080 80042100 0000833c 7ee9adb4 000a7020 0000833c 000a7008 7ee9aebf 5fc0: 0000833c 7ee9adb4 7ee9aebf 00000080 000001de 00000000 2ab5e000 00000000 5fe0: 7ee9abf0 7ee9abe0 0001a32c 2ac3e490 60000010 000a7020 aaaaaaaa aaaaaaaa [<80045390>] (__bug+0x1c/0x28) from [<8004b548>] (___dma_single_cpu_to_dev+0xd4/0x108) [<8004b548>] (___dma_single_cpu_to_dev+0xd4/0x108) from [<803cd650>] (ahash_digest+0x3e4/0x61c) [<803cd650>] (ahash_digest+0x3e4/0x61c) from [<80208db8>] (crypto_ahash_op+0x40/0xf0) [<80208db8>] (crypto_ahash_op+0x40/0xf0) from [<7f088b40>] (test_ahash_speed.constprop.8+0x540/0x690 [tcrypt]) [<7f088b40>] (test_ahash_speed.constprop.8+0x540/0x690 [tcrypt]) from [<7f08a3e0>] (do_test+0x1270/0x1dd0 [tcrypt]) [<7f08a3e0>] (do_test+0x1270/0x1dd0 [tcrypt]) from [<7f08e06c>] (tcrypt_mod_init+0x6c/0xc8 [tcrypt]) [<7f08e06c>] (tcrypt_mod_init+0x6c/0xc8 [tcrypt]) from [<8003c588>] (do_one_initcall+0x10c/0x170) [<8003c588>] (do_one_initcall+0x10c/0x170) from [<800aae9c>] (sys_init_module+0x74/0x19c) [<800aae9c>] (sys_init_module+0x74/0x19c) from [<80042100>] (ret_fast_syscall+0x0/0x30) Code: e59f0010 e1a01003 eb131d31 e3a03000 (e5833000) Signed-off-by: Hudson Winston <B45308@freescale.com> Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com> Signed-off-by: Jason Liu <r64343@freescale.com> Signed-off-by: Terry Lv <r65388@freescale.com>
-rw-r--r--crypto/tcrypt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 2222617b3bed..6ff34df13b5c 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -658,7 +658,8 @@ static void test_ahash_speed(const char *algo, unsigned int sec,
struct tcrypt_result tresult;
struct ahash_request *req;
struct crypto_ahash *tfm;
- static char output[1024];
+ const int output_size = 1024;
+ char *output = kmalloc(output_size, GFP_KERNEL);
int i, ret;
printk(KERN_INFO "\ntesting speed of async %s\n", algo);
@@ -670,9 +671,9 @@ static void test_ahash_speed(const char *algo, unsigned int sec,
return;
}
- if (crypto_ahash_digestsize(tfm) > sizeof(output)) {
+ if (crypto_ahash_digestsize(tfm) > output_size) {
pr_err("digestsize(%u) > outputbuffer(%zu)\n",
- crypto_ahash_digestsize(tfm), sizeof(output));
+ crypto_ahash_digestsize(tfm), output_size);
goto out;
}