teawater / kgtp

KGTP is a comprehensive dynamic tracer for analysing Linux kernel and application (including Android) problems on production systems in real time.
http://teawater.github.io/kgtp/
85 stars 36 forks source link

用不同版本GCC编译出的KGTP模块插入后 无法rmmod #44

Open teawater opened 9 years ago

teawater commented 9 years ago

ifdef CONFIG_FUNCTION_TRACER CFLAGS_REMOVE_gtp.o = -pg endif 增加了这句保证编译通过

teawater@teawater-OptiPlex-9020:~/kernel/kgtp$ sudo rmmod gtp rmmod: ERROR: ../libkmod/libkmod-module.c:769 kmod_module_remove_module() could not remove 'gtp': Device or resource busy rmmod: ERROR: could not remove module gtp: Device or resource busy

经过检查是内核返回的busy错误 如果这时再插入 plugin_example.ko 可能导致奇怪的OOPS

另外同样版本GCC可能也会遇到rmmod 不了的情况 不过在插入过一次 plugin_example.ko 后 一切恢复正常了

teawater commented 9 years ago

内核无法找到exit函数

https://github.com/teawater/kgtp/issues/30 一样的问题