AnsweredAssumed Answered

Generate Blob Under Linux

Question asked by sankar salla on Oct 4, 2018
Latest reply on Oct 19, 2018 by Yuri Muhin

Hi All,

We are trying to generate blob under linux,we are using linux-4.9.15.

We got some link in nxp forum Generate Blob Under Linux 

We followed the step based on the pdf.

Driver compiled successfully and node also created in dev like /dev/kb.

once we are trying to run application kernel panic happens.

please find below log.

./kb_test encap key.file blob.file

encap test

key:
31 31 31 31 32 32 32 32 33 33 33 33 34 34 34 34 35 35 35 35 36 36 36 36 37 37 37 37 38 38
38 38
Unable to handle kernel paging request at virtual address a0049aa0
pgd = 9ce4c000
[a0049aa0] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 273 Comm: kb_test Not tainted 4.9.51-gfa28e9f-dirty #6
Hardware name: Freescale i.MX6 UltraLite (Device Tree)
task: 9c58f180 task.stack: 9ce6e000
PC is at dma_cache_maint_page+0x44/0x120
LR is at __dma_page_cpu_to_dev+0x24/0x88
pc : [<801133a0>] lr : [<801134a0>] psr: 60080013
sp : 9ce6fdd8 ip : 80f062c4 fp : 80fdf800
r10: 80f030d4 r9 : 80116e4c r8 : 00000002
r7 : 00022955 r6 : 000a2955 r5 : 00000008 r4 : 00000000
r3 : 9fbf7000 r2 : 00000008 r1 : 00080000 r0 : 00452aa0
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 10c53c7d Table: 9ce4c06a DAC: 00000051
Process kb_test (pid: 273, stack limit = 0x9ce6e210)
Stack: (0x9ce6fdd8 to 0x9ce70000)
fdc0: 0009ccb0 8016c5d0
fde0: 9ccb0c00 00000000 a0049aa0 00000002 00000008 00000020 a2955000 00101000
fe00: 00000000 801134a0 80116e4c 801b32dc 00000000 9c51c410 00000000 a0049aa0
fe20: 00000050 801135a8 9c51c410 9ccb0c00 80fdf800 807693b0 00000002 00000000
fe40: 00000000 00006587 9fbeeaa4 80cc775c 9c03715c 9c03715c 7ece3c54 809b0e40
fe60: 00003701 809aa10c 9c3b6c00 9c3b6c00 00000000 00000001 7ece3c54 809b0b3c
fe80: 31313131 9c51c410 00000020 00000000 80ffa2e4 00000003 9ce6e000 00000000
fea0: 7ece3c54 80769b28 00000000 a2955000 00000020 80f75300 9c52c030 00000000
fec0: 00000003 9ce6fed8 00000051 00000000 c0084b00 80769e10 00000020 00000050
fee0: 9c883a80 7ece3c3c 9c52c030 80209fe4 7ece3c54 801f9730 9ce6ffb0 10c53c7d
ff00: 00000000 76fa9000 7ece3c54 80101364 00000000 00000001 00000000 00000001
ff20: 9cca3848 000003eb 00000000 00000000 80f033f4 9cca3840 00000000 9c31c030
ff40: 00000061 00000002 00000000 9cca3848 7ece3c54 801fa914 00000000 00000000
ff60: 00000001 9cca3840 9cca3840 9c883a80 9c883a80 7ece3c3c c0084b00 00000003
ff80: 9ce6e000 00000000 7ece3c54 8020a8f4 00008e4c 00000000 00008570 00000036
ffa0: 80107884 801076c0 00008e4c 00000000 00000003 c0084b00 7ece3c3c 7ece3c3c
ffc0: 00008e4c 00000000 00008570 00000036 00000000 00000000 76fa9000 7ece3c54
ffe0: 00011124 7ece3c2c 0000884c 76f054dc 60080010 00000003 00882014 82e826c6
[<801133a0>] (dma_cache_maint_page) from [<801134a0>] (__dma_page_cpu_to_dev+0x24/0x88)
[<801134a0>] (__dma_page_cpu_to_dev) from [<801135a8>] (arm_dma_map_page+0x5c/0x68)
[<801135a8>] (arm_dma_map_page) from [<807693b0>] (sm_keystore_slot_export+0x184/0x3b0)
[<807693b0>] (sm_keystore_slot_export) from [<80769b28>] (kb_encap+0xc4/0x114)
[<80769b28>] (kb_encap) from [<80769e10>] (kb_ioctl+0x17c/0x1a8)
[<80769e10>] (kb_ioctl) from [<80209fe4>] (do_vfs_ioctl+0x8c/0x964)
[<80209fe4>] (do_vfs_ioctl) from [<8020a8f4>] (SyS_ioctl+0x38/0x54)
[<8020a8f4>] (SyS_ioctl) from [<801076c0>] (ret_fast_syscall+0x0/0x3c)
Code: e59fa0e0 e1a04a24 e08162c0 e0677006 (e7932287)
---[ end trace 4869da3a824a82bf ]---
Segmentation fault

 

Can you please help us to solve this kernel panic.

 

Thanks & Regards,

Sankar.

Outcomes