AnsweredAssumed Answered

Kernel Panik (oops) on i.mx6s and i.mx6q after activating Closed Security

Question asked by Bernhard Strasser on Oct 11, 2013
Latest reply on Sep 19, 2014 by Otto Blom

Hi,

 

in Open Security configuration, Kernel and CAAM runns well, no HAB events. CAAM is build in Kernel.

After activating Closed Security Kernel gets a Kernel Panic (oops).

 

[6.625359] caam caam.0: failed to instantiate RNG
[6.630163] Unable to handle kernel NULL pointer dereference at virtual address 00000038
[6.638267] pgd = 80004000
[6.640975] [00000038] *pgd=00000000
[6.644568] Internal error: Oops: 5 [#1] PREEMPT

 

if i compile kernel with CAAM as modul settings the Kernel starts, building CAAM Kernel Module not work

 

Kernel build log : (CAAM as Module Configuration)

  LD  arch/arm/boot/compressed/vmlinux

  OBJCOPY arch/arm/boot/zImage

  Kernel: arch/arm/boot/zImage is ready

  Building modules, stage 2.

  MODPOST 7 modules

ERROR: "caam_algapi_hash_startup" [drivers/crypto/caam/caam.ko] undefined!

ERROR: "caam_algapi_shutdown" [drivers/crypto/caam/caam.ko] undefined!

ERROR: "caam_sm_startup" [drivers/crypto/caam/caam.ko] undefined!

ERROR: "caam_sm_shutdown" [drivers/crypto/caam/caam.ko] undefined!

ERROR: "caam_rng_shutdown" [drivers/crypto/caam/caam.ko] undefined!

ERROR: "caam_algapi_hash_shutdown" [drivers/crypto/caam/caam.ko] undefined!

ERROR: "caam_algapi_startup" [drivers/crypto/caam/caam.ko] undefined!

ERROR: "caam_sm_example_init" [drivers/crypto/caam/caam.ko] undefined!

ERROR: "caam_rng_startup" [drivers/crypto/caam/caam.ko] undefined!

make[1]: *** [__modpost] Error 1

make: *** [modules] Error 2

 

 

 

 

Board: Custom Board ->based on Sabrelite Board

CPU: i.MX6s i.MX6q (separate kernel config)

Kernel 3.0.35 (BSP4.0.0)

 

 

who knows this trouble? there solutions?


regards Bernhard

 

Boot Log: (CAAM build in Kernel Configuration) after Security Closed

 

[ 3.923219] mmc0: no vmmc regulator found
[ 3.929440] mmc0: SDHCI controller on platform [sdhci-esdhc-imx.2] using ADMA
[ 3.936662] sdhci sdhci-esdhc-imx.0: no card-detect pin available!
[ 3.943864] mmc1: no vmmc regulator found
[ 3.954129] mmc1: SDHCI controller on platform [sdhci-esdhc-imx.0] using ADMA
[ 4.052546] mmc0: new SDIO card at address 0001
[ 4.204879] mmc1: new SDIO card at address 0001
[ 6.625359] caam caam.0: failed to instantiate RNG
[ 6.630163] Unable to handle kernel NULL pointer dereference at virtual address 00000038
[ 6.638267] pgd = 80004000
[ 6.640975] [00000038] *pgd=00000000
[ 6.644568] Internal error: Oops: 5 [#1] PREEMPT
[ 6.649188] Modules linked in:
[ 6.652258] CPU: 0 Not tainted  (3.0.35-2039-g267e004-svn5792 #13)
[ 6.658716] PC is at caam_sm_shutdown+0x18/0x2c
[ 6.663249] LR is at caam_sm_shutdown+0x14/0x2c
[ 6.667782] pc : [<802fbac0>]lr : [<802fbabc>]psr: 60000013
[ 6.667787] sp : 8d007eb0  ip : 00000001  fp : 804c4060
[ 6.679273] r10: 804c4060  r9 : 8f8e0000  r8 : fffffffb
[ 6.684500] r7 : 8f8e0000  r6 : 8e020800  r5 : 8cc2d540  r4 : 00000000
[ 6.691030] r3 : 802f1e10  r2 : 88003000  r1 : 8b900060  r0 : 00000000
[ 6.697562] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[ 6.704874] Control: 10c53c7d  Table: 10004059  DAC: 00000015
[ 6.710622] Process swapper (pid: 1, stack limit = 0x8d0062e8)
[ 6.716459] Stack: (0x8d007eb0 to 0x8d008000)
[ 6.720819] 7ea0: 8e020800 802f150c 802f1e10 8cc2d540
[ 6.729002] 7ec0: ffffffed 8e020800 8f8e0000 802f1e74 00000000 00000001 8c022390 8e020808
[ 6.737184] 7ee0: 8e029600 33000000 8e020808 8e020808 80511970 8e02083c 00000000 804f02bc
[ 6.745366] 7f00: 00000000 800218cc 00000000 8024096c 80240954 8023f748 8e020808 804f02bc
[ 6.753548] 7f20: 8e02083c 00000000 00000000 8023f8e0 804f02bc 00000000 8023f854 8023e968
[ 6.761729] 7f40: 8d8010f8 8e003450 804f02bc 804ea2a8 8c872480 8023f11c 8047b074 801ed36c
[ 6.769911] 7f60: 804f02bc 804f02bc 8d006000 800355e0 00000000 00000000 800218cc 8023fdb4
[ 6.778092] 7f80: 804f9580 8d006000 800355e0 00000000 00000000 8002f34c 00000000 8d81b4e0
[ 6.786274] 7fa0: 800951c8 800218cc 804dd3f8 800951f8 000001df 800355e0 00000013 37340000
[ 6.794456] 7fc0: 00000039 80027bc8 80027c38 800355e0 00000013 00000000 00000000 00000000
[ 6.802638] 7fe0: 00000000 800089e8 00000000 00000000 80008964 800355e0 ebffeffb eaeeffdf
[ 6.810831] [<802fbac0>] (caam_sm_shutdown+0x18/0x2c) from [<802f150c>] (caam_remove+0x20/0xc4)
[ 6.819539] [<802f150c>] (caam_remove+0x20/0xc4) from [<802f1e74>] (caam_probe+0x8c4/0xa70)
[ 6.827902] [<802f1e74>] (caam_probe+0x8c4/0xa70) from [<8024096c>] (platform_drv_probe+0x18/0x1c)
[ 6.836881] [<8024096c>] (platform_drv_probe+0x18/0x1c) from [<8023f748>] (driver_probe_device+0x90/0x19c)
[ 6.846546] [<8023f748>] (driver_probe_device+0x90/0x19c) from [<8023f8e0>] (__driver_attach+0x8c/0x90)
[ 6.855948] [<8023f8e0>] (__driver_attach+0x8c/0x90) from [<8023e968>] (bus_for_each_dev+0x5c/0x88)
[ 6.865003] [<8023e968>] (bus_for_each_dev+0x5c/0x88) from [<8023f11c>] (bus_add_driver+0x17c/0x244)
[ 6.874145] [<8023f11c>] (bus_add_driver+0x17c/0x244) from [<8023fdb4>] (driver_register+0x78/0x13c)
[ 6.883290] [<8023fdb4>] (driver_register+0x78/0x13c) from [<8002f34c>] (do_one_initcall+0x34/0x174)
[ 6.892437] [<8002f34c>] (do_one_initcall+0x34/0x174) from [<800089e8>] (kernel_init+0x84/0x124)
[ 6.901237] [<800089e8>] (kernel_init+0x84/0x124) from [<800355e0>] (kernel_thread_exit+0x0/0x8)
[ 6.910031] Code: ebfd0dfb e5900060 ebfd0df9 e1a04000 (e5900038)
[ 6.916157] ---[ end trace f74bc9c599f351aa ]---
[ 6.920785] Kernel panic - not syncing: Attempted to kill init!
[ 6.926736] [<80039a2c>] (unwind_backtrace+0x0/0xf8) from [<803a0040>] (panic+0x64/0x178)
[ 6.934940] [<803a0040>] (panic+0x64/0x178) from [<80063018>] (do_exit+0x670/0x6f8)
[ 6.942607] [<80063018>] (do_exit+0x670/0x6f8) from [<80038198>] (die+0x22c/0x2a0)
[ 6.950197] [<80038198>] (die+0x22c/0x2a0) from [<8039fa24>] (__do_kernel_fault.part.5+0x54/0x74)
[ 6.959092] [<8039fa24>] (__do_kernel_fault.part.5+0x54/0x74) from [<8003d5f0>] (do_page_fault+0x2b4/0x31c)
[ 6.968853] [<8003d5f0>] (do_page_fault+0x2b4/0x31c) from [<8002f194>] (do_DataAbort+0x34/0x9c)
[ 6.977569] [<8002f194>] (do_DataAbort+0x34/0x9c) from [<80034710>] (__dabt_svc+0x70/0xa0)
[ 6.985842] Exception stack(0x8d007e68 to 0x8d007eb0)
[ 6.990901] 7e60: 00000000 8b900060 88003000 802f1e10 00000000 8cc2d540
[ 6.999093] 7e80: 8e020800 8f8e0000 fffffffb 8f8e0000 804c4060 804c4060 00000001 8d007eb0
[ 7.007281] 7ea0: 802fbabc 802fbac0 60000013 ffffffff
[ 7.012346] [<80034710>] (__dabt_svc+0x70/0xa0) from [<802fbac0>] (caam_sm_shutdown+0x18/0x2c)
[ 7.020975] [<802fbac0>] (caam_sm_shutdown+0x18/0x2c) from [<802f150c>] (caam_remove+0x20/0xc4)
[ 7.029692] [<802f150c>] (caam_remove+0x20/0xc4) from [<802f1e74>] (caam_probe+0x8c4/0xa70)
[ 7.038060] [<802f1e74>] (caam_probe+0x8c4/0xa70) from [<8024096c>] (platform_drv_probe+0x18/0x1c)
[ 7.047038] [<8024096c>] (platform_drv_probe+0x18/0x1c) from [<8023f748>] (driver_probe_device+0x90/0x19c)
[ 7.056711] [<8023f748>] (driver_probe_device+0x90/0x19c) from [<8023f8e0>] (__driver_attach+0x8c/0x90)
[ 7.066121] [<8023f8e0>] (__driver_attach+0x8c/0x90) from [<8023e968>] (bus_for_each_dev+0x5c/0x88)
[ 7.075184] [<8023e968>] (bus_for_each_dev+0x5c/0x88) from [<8023f11c>] (bus_add_driver+0x17c/0x244)
[ 7.084325] [<8023f11c>] (bus_add_driver+0x17c/0x244) from [<8023fdb4>] (driver_register+0x78/0x13c)
[ 7.093474] [<8023fdb4>] (driver_register+0x78/0x13c) from [<8002f34c>] (do_one_initcall+0x34/0x174)
[ 7.102622] [<8002f34c>] (do_one_initcall+0x34/0x174) from [<800089e8>] (kernel_init+0x84/0x124)
[ 7.111424] [<800089e8>] (kernel_init+0x84/0x124) from [<800355e0>] (kernel_thread_exit+0x0/0x8)

 

Outcomes