分析kmemleak结果 [英] Analyzing kmemleak result

查看:209
本文介绍了分析kmemleak结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在我的一个模块上运行kmemleak来发现泄漏,下面是一段时间后的结果. 从结果来看,我理解的是下面的地址是.ko或.o文件中的对象地址.

I am running kmemleak on one of my modules to find leaks, below is the result after a while. From the result, what i understand is below address are object/s address in the .ko or .o file.

unreferenced object 0xffff8803c9708f10 (size 32):
  comm "resiter_access_i_o", pid 2320, jiffies 4294798486
  hex dump (first 32 bytes):
    d8 8e 70 c9 03 88 ff ff a0 8e 70 c9 03 88 ff ff  ..p.......p.....
    68 8e 70 c9 03 88 ff ff 30 8e 70 c9 03 88 ff ff  h.p.....0.p.....
  backtrace:
    [<ffffffff81516e3e>] kmemleak_alloc+0x5e/0xd0
    [<ffffffff8117cf2a>] __kmalloc+0x1ea/0x330
    [<ffffffffa04cafbb>] 0xffffffffa04cafbb
    [<ffffffffa04ad3a0>] 0xffffffffa04ad3a0
    [<ffffffffa04ae8fb>] 0xffffffffa04ae8fb
    [<ffffffffa0422e3a>] 0xffffffffa0422e3a
    [<ffffffffa0423022>] 0xffffffffa0423022
    [<ffffffff81096e86>] kthread+0x96/0xa0
    [<ffffffff8100c20a>] child_rip+0xa/0x20
    [<ffffffffffffffff>] 0xffffffffffffffff

根据我的理解,我使用gdb进行了以下操作来找到对应的功能 但出现以下错误

Based on my understanding, i did the following using gdb to find the function corresponding but i get the following error

gdb resiter_access_i_o.ko
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from resiter_access_i_o.ko ...done.
(gdb) info symbol 0xffffffffa04ae8fb
No symbol matches 0xffffffffa04ae8fb.
(gdb) q

请问我如何计算出与上述地址对应的功能?预先感谢...

Can some point me how to figure out the function corresponding to the above address? Thanks in advance...

推荐答案

为什么不尝试使用对象转储,crashdum,crashtool等工具? 您应该可以轻松地从这些工具和所拥有的对象中找到函数名称

Why dont you try tools like object dump, crashdum, crashtool, etc. you should easily be able to find the function name from these tools and the objects you have

这篇关于分析kmemleak结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆