diff options
Diffstat (limited to 'Documentation/kprobes.txt')
-rw-r--r-- | Documentation/kprobes.txt | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index 48b3de90eb1e..1e7a769a10f9 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt | |||
@@ -212,7 +212,9 @@ hit, Kprobes calls kp->pre_handler. After the probed instruction | |||
212 | is single-stepped, Kprobe calls kp->post_handler. If a fault | 212 | is single-stepped, Kprobe calls kp->post_handler. If a fault |
213 | occurs during execution of kp->pre_handler or kp->post_handler, | 213 | occurs during execution of kp->pre_handler or kp->post_handler, |
214 | or during single-stepping of the probed instruction, Kprobes calls | 214 | or during single-stepping of the probed instruction, Kprobes calls |
215 | kp->fault_handler. Any or all handlers can be NULL. | 215 | kp->fault_handler. Any or all handlers can be NULL. If kp->flags |
216 | is set KPROBE_FLAG_DISABLED, that kp will be registered but disabled, | ||
217 | so, it's handlers aren't hit until calling enable_kprobe(kp). | ||
216 | 218 | ||
217 | NOTE: | 219 | NOTE: |
218 | 1. With the introduction of the "symbol_name" field to struct kprobe, | 220 | 1. With the introduction of the "symbol_name" field to struct kprobe, |
@@ -363,6 +365,26 @@ probes) in the specified array, they clear the addr field of those | |||
363 | incorrect probes. However, other probes in the array are | 365 | incorrect probes. However, other probes in the array are |
364 | unregistered correctly. | 366 | unregistered correctly. |
365 | 367 | ||
368 | 4.7 disable_*probe | ||
369 | |||
370 | #include <linux/kprobes.h> | ||
371 | int disable_kprobe(struct kprobe *kp); | ||
372 | int disable_kretprobe(struct kretprobe *rp); | ||
373 | int disable_jprobe(struct jprobe *jp); | ||
374 | |||
375 | Temporarily disables the specified *probe. You can enable it again by using | ||
376 | enable_*probe(). You must specify the probe which has been registered. | ||
377 | |||
378 | 4.8 enable_*probe | ||
379 | |||
380 | #include <linux/kprobes.h> | ||
381 | int enable_kprobe(struct kprobe *kp); | ||
382 | int enable_kretprobe(struct kretprobe *rp); | ||
383 | int enable_jprobe(struct jprobe *jp); | ||
384 | |||
385 | Enables *probe which has been disabled by disable_*probe(). You must specify | ||
386 | the probe which has been registered. | ||
387 | |||
366 | 5. Kprobes Features and Limitations | 388 | 5. Kprobes Features and Limitations |
367 | 389 | ||
368 | Kprobes allows multiple probes at the same address. Currently, | 390 | Kprobes allows multiple probes at the same address. Currently, |
@@ -500,10 +522,14 @@ the probe. If the probed function belongs to a module, the module name | |||
500 | is also specified. Following columns show probe status. If the probe is on | 522 | 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 | 523 | a virtual address that is no longer valid (module init sections, module |
502 | virtual addresses that correspond to modules that've been unloaded), | 524 | virtual addresses that correspond to modules that've been unloaded), |
503 | such probes are marked with [GONE]. | 525 | such probes are marked with [GONE]. If the probe is temporarily disabled, |
526 | such probes are marked with [DISABLED]. | ||
504 | 527 | ||
505 | /debug/kprobes/enabled: Turn kprobes ON/OFF | 528 | /debug/kprobes/enabled: Turn kprobes ON/OFF forcibly. |
506 | 529 | ||
507 | Provides a knob to globally turn registered kprobes ON or OFF. By default, | 530 | Provides a knob to globally and forcibly turn registered kprobes ON or OFF. |
508 | all kprobes are enabled. By echoing "0" to this file, all registered probes | 531 | By default, all kprobes are enabled. By echoing "0" to this file, all |
509 | will be disarmed, till such time a "1" is echoed to this file. | 532 | registered probes will be disarmed, till such time a "1" is echoed to this |
533 | file. Note that this knob just disarms and arms all kprobes and doesn't | ||
534 | change each probe's disabling state. This means that disabled kprobes (marked | ||
535 | [DISABLED]) will be not enabled if you turn ON all kprobes by this knob. | ||