diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-06-05 11:18:34 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-06-05 12:26:50 +0200 |
commit | 10b0256496fd6c162478547f7c6df1e052e87644 (patch) | |
tree | 7037905737ae83a86a5cdb376cd1d66f7f407e2e /Documentation | |
parent | c56d34064b6eb9f9cde9e35bbfe16eedf3d81f94 (diff) | |
parent | 69902c718c0b476e94ed7fccd3cf29ca39fe433a (diff) | |
download | op-kernel-dev-10b0256496fd6c162478547f7c6df1e052e87644.zip op-kernel-dev-10b0256496fd6c162478547f7c6df1e052e87644.tar.gz |
Merge branch 'perf/kprobes' into perf/core
Conflicts:
arch/x86/kernel/traps.c
The kprobes enhancements are fully cooked, ship them upstream.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/kprobes.txt | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index 0cfb00f..4bbeca8 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt @@ -22,8 +22,9 @@ Appendix B: The kprobes sysctl interface Kprobes enables you to dynamically break into any kernel routine and collect debugging and performance information non-disruptively. You -can trap at almost any kernel code address, specifying a handler +can trap at almost any kernel code address(*), specifying a handler routine to be invoked when the breakpoint is hit. +(*: some parts of the kernel code can not be trapped, see 1.5 Blacklist) There are currently three types of probes: kprobes, jprobes, and kretprobes (also called return probes). A kprobe can be inserted @@ -273,6 +274,19 @@ using one of the following techniques: or - Execute 'sysctl -w debug.kprobes_optimization=n' +1.5 Blacklist + +Kprobes can probe most of the kernel except itself. This means +that there are some functions where kprobes cannot probe. Probing +(trapping) such functions can cause a recursive trap (e.g. double +fault) or the nested probe handler may never be called. +Kprobes manages such functions as a blacklist. +If you want to add a function into the blacklist, you just need +to (1) include linux/kprobes.h and (2) use NOKPROBE_SYMBOL() macro +to specify a blacklisted function. +Kprobes checks the given probe address against the blacklist and +rejects registering it, if the given address is in the blacklist. + 2. Architectures Supported Kprobes, jprobes, and return probes are implemented on the following |