内核反汇编——精选推荐

内核反汇编
一流多开objdump 参数介绍
-d: 将代码段反汇编
-S: 将代码段反汇编的同时,将反汇编代码和源代码交替显⽰,源码编译需要加-g参数,即需要调试信息
-C: 将C++符号名逆向解析
-l: 反汇编代码中插⼊源代码的⽂件名和⾏号
-j section: 仅反编译所指定的section,可以有多个-j参数来选择多个section
具体⽤法⽰例如下:
>>objdump -dS helloworld.ko > helloworld.s //需要注意,编译时需加-g参数,在Makefile EXTRA_CFLAS中添加
>>vim hellowrold.s
Oops信息介绍
不锈钢肥皂盒
电工工具包Oct 10 09:20:15 localhost kernel: [ 305.701709] BUG: unable to handle kernel NULL pointer dereference at (null) #Bug的原因
Oct 10 09:20:15 localhost kernel: [ 305.702491] IP: [] Funciton_ERROR + 0x96 / 0x96 [cm] #Bug的函数 红⾊表⽰函数偏移(出错位置)黄⾊
表⽰函数⼤⼩
Oct 10 09:20:15 localhost kernel: [ 305.702606] PGD 0
Oct 10 09:20:15 localhost kernel: [ 305.702678] Oops: 0000 [#1] SMP
Oct 10 09:20:15 localhost kernel: [ 305.702789] Modules linked in: xx1(O) xx2(O) xx3(O) xx4(O) scst_vdisk(O) scst(O) dlm configfs sctp libcrc32c xx5(O) htel ghash_clmulni_intel shpchp vmxnet3 i2c_piix4 pcspkr microcode vmw_balloon aesni_intel ablk_helper cryptd lrw
aes_x86_64 xts gf128mul vmw_pvscsi floppy vm
Oct 10 09:20:15 localhost kernel: [ 305.705168] CPU 3
Oct 10 09:20:15 localhost kernel: [ 305.705254] Pid: 1598, comm: CmJob0 Tainted: G O 3.8.0 #4 VMware, Inc. VMware Virtual
Platform/440BX Desktop R
Oct 10 09:20:15 localhost kernel: [ 305.705550] RIP: 0010:[ffffffffa0479cf8] [ffffffffa0479cf8] Function_ERROR+0x96/0x1bf [xx1] Oct 10 09:20:15 localhost kernel: [ 305.705887] RSP: 0018:ffff88040259fd88 EFLAGS: 00010246 Oct 10 09:20:15 localhost kernel: [ 305.706045] RAX: ffff8804299ab000 RBX: ffff88042417c148 RCX: 0000000000000002 Oct 10 09:20:15 localhost kernel: [ 305.706247] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88042417c000 Oct 10 09:20:15 localhost kernel: [ 305.706449] RBP: ffff88040259fde8 R08: 0000000000000000 R09: 0000000000000004
Oct 10 09:20:15 localhost kernel: [ 305.706634] R10: 0000000000000000 R11: ffff88040259fde8 R12: ffff880424180000
铅笔加工Oct 10 09:20:15 localhost kernel: [ 305.706819] R13: 0000000000000000 R14: ffff88040289c000 R15: 0000000000001000 Oct 10 09:20:15 localhost kernel: [ 305.707029] FS: 0000000000000000(0000) GS:ffff88043fcc0000(0000) knlGS:0000000000000000 Oct 10 09:20:15 l
ocalhost kernel: [ 305.707282] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b Oct 10 09:20:15 localhost kernel: [ 305.707461] CR2: 0000000000000000 CR3: 000000042aa2c000 CR4: 00000000000407e0 Oct 10 09:20:15 localhost kernel: [ 305.707701] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 Oct 10 09:20:15 localhost kernel: [ 305.707947] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Oct 10 09:20:15 localhost kernel: [ 305.708058] Process CmJob0 (pid: 1598, threadinfo ffff88040259e000, task ffff88042bbac1d0)
ktkp-073
Oct 10 09:20:15 localhost kernel: [ 305.708197] Stack:
Oct 10 09:20:15 localhost kernel: [ 305.708261] ffff880424180000 ffff88042417c000 ffff88040259fde8 0000000000000000 Oct 10 09:20:15 localhost kernel: [ 305.708500] 0000000000000004 ffff8804299ab000 ffffffffa0483b28 ffff88042417c000 Oct 10 09:20:15 localhost kernel: [ 305.708739] ffff880425178000 ffff880424180000 ffff88042417c178 ffffffffa0483044
Oct 10 09:20:15 localhost kernel: [ 305.708978] Call Trace: #函数调⽤栈
Oct 10 09:20:15 localhost kernel: [ 305.709052] [] Function_4+0x283/0x43d [xx1]连接轴
Oct 10 09:20:15 localhost kernel: [ 305.709165] [] Function_3+0x244/0x2a2 [xx1]
Oct 10 09:20:15 localhost kernel: [ 305.709271] [] Function_2+0x1e5/0x278 [xx1]
Oct 10 09:20:15 localhost kernel: [ 305.709375] [] ? Function_1+0xf3/0xf3 [xx1]
Oct 10 09:20:15 localhost kernel: [ 305.709487] [] kthread+0x95/0x9d
Oct 10 09:20:15 localhost kernel: [ 305.709579] [] ? kthread_freezable_should_stop +0x46/0x46
Oct 10 09:20:15 localhost kernel: [ 305.709690] [] ret_from_fork+0x7c/0xb0
Oct 10 09:20:15 localhost kernel: [ 305.709785] [] ? kthread_freezable_should_stop + 0x46/0x46

本文发布于:2024-09-21 22:05:18,感谢您对本站的认可!

本文链接:https://www.17tex.com/tex/2/101515.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:需要   反汇编   参数   编译   代码   交替   源代码
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议