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