Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Last active May 29, 2024 03:10
Show Gist options
  • Save cleverca22/6ca15fdc6fb014cc8e7094c2b0979ea1 to your computer and use it in GitHub Desktop.
Save cleverca22/6ca15fdc6fb014cc8e7094c2b0979ea1 to your computer and use it in GitHub Desktop.
[ 0.194945] This architecture does not have kernel memory protection.
[ 0.195113] Run /bin/sh as init process
BusyBox v1.36.1 () built-in shell (ash)
# cat /init
[ 1.848190] sh[15]: unhandled signal 11 code 0x2 at 0x81549934
[ 1.848402] CPU: 0 PID: 15 Comm: sh Not tainted 6.8.9 #1-NixOS
[ 1.848569] Hardware name: riscv-minimal-nommu,qemu (DT)
[ 1.848703] epc : 81549934 ra : 81549934 sp : 8153f9f0
[ 1.848845] gp : 8156b800 tp : 816f5014 t0 : 00000000
[ 1.848979] t1 : 81543b4c t2 : 00000000 s0 : 00000000
[ 1.849113] s1 : 8153fa00 a0 : 00000000 a1 : 8153fa00
[ 1.849247] a2 : 8153fa00 a3 : fffffffc a4 : 7ffbfeff
[ 1.849387] a5 : 00000000 a6 : 00000000 a7 : 00000087
[ 1.849516] s2 : 816f5014 s3 : 816f38c8 s4 : 8153f9ec
[ 1.849662] s5 : 00000002 s6 : 00000000 s7 : 816f208c
[ 1.849804] s8 : 00000000 s9 : 816f2084 s10: 816f209c
[ 1.849937] s11: ffffffff t3 : 81673978 t4 : 00000000
[ 1.850070] t5 : 00000000 t6 : 00000000
[ 1.850181] status: 00000080 badaddr: 0000003a cause: 00000005
[ 1.850370] Code: 8513 0004 90ef c9df 8593 0004 0513 0020 a0ef 4cc1 (a783) 038a
[ 1.850737] sh[1]: unhandled signal 11 code 0x2 at 0x816687e8
[ 1.850935] CPU: 0 PID: 1 Comm: sh Not tainted 6.8.9 #1-NixOS
[ 1.851093] Hardware name: riscv-minimal-nommu,qemu (DT)
[ 1.851218] epc : 816687e8 ra : 816687e4 sp : 8153f940
[ 1.851363] gp : 8156b800 tp : 816f5014 t0 : 0000005f
[ 1.851505] t1 : 816f5014 t2 : 00000000 s0 : 8153f94c
[ 1.851648] s1 : 816f38c8 a0 : 00000000 a1 : ffffffff
[ 1.851785] a2 : 8153f94c a3 : 00000004 a4 : b2581d28
[ 1.851926] a5 : fffffffc a6 : 00000000 a7 : 0000005f
[ 1.852061] s2 : 00000000 s3 : 00000001 s4 : 816f5f70
[ 1.852193] s5 : 81574c70 s6 : 8156b798 s7 : 00000004
[ 1.852335] s8 : 00000000 s9 : 8153f9fc s10: 816f209c
[ 1.852472] s11: ffffffff t3 : 81669efc t4 : 00000000
[ 1.852614] t5 : 00000000 t6 : 00000000
[ 1.852729] status: 00000080 badaddr: 00000000 cause: 00000005
[ 1.852917] Code: 0513 0004 a0ef 5ac0 8513 0004 a0ef b24b 2703 08c1 (2783) 0009
[ 1.853109] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 1.853296] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---
PC: 8012f024 [0x44c1a783] MIP:00000000 MIE:00000888 Z:00000000 ra:80008070 sp:80c15df0 gp:801ff158 tp:80c12000 t0:80c15d20 t1:0000002d t2:205b2d2d s0:0000044c s1:00000000 a0:000003e7 a1:801f4ad2 a2:ffc85600 a3:000001f3 a4:002e3ed5 a5:ffffffff a6:bffff064 a7:80190a8c s2:0000002f s3:000004b0 s4:80c15e68 s5:00000001 s6:00000001 s7:0000001e s8:80c160b0 s9:8153f9fc s10:816f209c s11:ffffffff t3:8020275b t4:8020275b t5:8020275c t6:80c15bd0
opcodes: 0x0 0x1406e815
81549850: 00022797 auipc a5,0x22
81549854: b147a783 lw a5,-1260(a5) # 0x8156b364
81549858: 0007a703 lw a4,0(a5)
8154985c: f4010113 add sp,sp,-192
81549860: 0b312623 sw s3,172(sp)
81549864: 03872703 lw a4,56(a4)
81549868: 0b412423 sw s4,168(sp)
8154986c: 0a112e23 sw ra,188(sp)
81549870: 0a812c23 sw s0,184(sp)
81549874: 0a912a23 sw s1,180(sp)
81549878: 0b212823 sw s2,176(sp)
8154987c: 0b512223 sw s5,164(sp)
81549880: 0b612023 sw s6,160(sp)
81549884: 09712e23 sw s7,156(sp)
81549888: 09812c23 sw s8,152(sp)
8154988c: 09912a23 sw s9,148(sp)
81549890: 00050993 mv s3,a0
81549894: 00058a13 mv s4,a1
81549898: 00058663 beqz a1,0x815498a4
8154989c: 0145c683 lbu a3,20(a1)
815498a0: 00069463 bnez a3,0x815498a8
815498a4: 00099663 bnez s3,0x815498b0
815498a8: 20070a63 beqz a4,0x81549abc
815498ac: 00000993 li s3,0
815498b0: 0007aa83 lw s5,0(a5)
815498b4: 00022b17 auipc s6,0x22
815498b8: ee4b0b13 add s6,s6,-284 # 0x8156b798
815498bc: 00400b93 li s7,4
815498c0: 01010493 add s1,sp,16
815498c4: 030aa783 lw a5,48(s5)
815498c8: 00178793 add a5,a5,1
815498cc: 02faa823 sw a5,48(s5)
815498d0: fff98913 add s2,s3,-1
815498d4: 0019bc13 seqz s8,s3
815498d8: 01203933 snez s2,s2
815498dc: 00c10c93 add s9,sp,12
815498e0: 41800c33 neg s8,s8
815498e4: 020aac23 sw zero,56(s5)
815498e8: 00090613 mv a2,s2
815498ec: 000c8593 mv a1,s9
815498f0: fff00513 li a0,-1
815498f4: efcf90ef jal 0x81542ff0
815498f8: 00050413 mv s0,a0
815498fc: 00055e63 bgez a0,0x81549918
81549900: 000b2783 lw a5,0(s6)
81549904: 0007a783 lw a5,0(a5)
81549908: ff7780e3 beq a5,s7,0x815498e8
8154990c: e44fc0ef jal 0x81545f50
81549910: 18040063 beqz s0,0x81549a90
81549914: 16c0006f j 0x81549a80
81549918: 18051063 bnez a0,0x81549a98
8154991c: 180c1c63 bnez s8,0x81549ab4
81549920: 00048513 mv a0,s1
81549924: c9df90ef jal 0x815435c0
81549928: 00048593 mv a1,s1
8154992c: 00200513 li a0,2
81549930: 4cc1a0ef jal 0x81563dfc
81549934: 038aa783 lw a5,56(s5)
81549938: 00079663 bnez a5,0x81549944
8154993c: 03caa783 lw a5,60(s5)
81549940: 02078063 beqz a5,0x81549960
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment