diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2009-01-06 17:41:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 18:59:21 -0500 |
commit | e8386a0cb22f4a2d439384212c494ad0bda848fe (patch) | |
tree | 84c462bccddead49c0e2c0dcfcc0f70cd9cf60f7 /Documentation | |
parent | 017c39bdb1b3ac1da6db339474a77b528043c05a (diff) |
kprobes: support probing module __exit function
Allows kprobes to probe __exit routine. This adds flags member to struct
kprobe. When module is freed(kprobes hooks module_notifier to get this
event), kprobes which probe the functions in that module are set to "Gone"
flag to the flags member. These "Gone" probes are never be enabled.
Users can check the GONE flag through debugfs.
This also removes mod_refcounted, because we couldn't free a module if
kprobe incremented the refcount of that module.
[akpm@linux-foundation.org: document some locking]
[mhiramat@redhat.com: bugfix: pass aggr_kprobe to arch_remove_kprobe]
[mhiramat@redhat.com: bugfix: release old_p's insn_slot before error return]
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/kprobes.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index a79633d702bf..48b3de90eb1e 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt | |||
@@ -497,7 +497,10 @@ The first column provides the kernel address where the probe is inserted. | |||
497 | The second column identifies the type of probe (k - kprobe, r - kretprobe | 497 | The second column identifies the type of probe (k - kprobe, r - kretprobe |
498 | and j - jprobe), while the third column specifies the symbol+offset of | 498 | and j - jprobe), while the third column specifies the symbol+offset of |
499 | the probe. If the probed function belongs to a module, the module name | 499 | the probe. If the probed function belongs to a module, the module name |
500 | is also specified. | 500 | is also specified. Following columns show probe status. If the probe is on |
501 | a virtual address that is no longer valid (module init sections, module | ||
502 | virtual addresses that correspond to modules that've been unloaded), | ||
503 | such probes are marked with [GONE]. | ||
501 | 504 | ||
502 | /debug/kprobes/enabled: Turn kprobes ON/OFF | 505 | /debug/kprobes/enabled: Turn kprobes ON/OFF |
503 | 506 | ||