forked from iovisor/bcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request iovisor#1633 from hMcLauchlan/inject-tool
Add new targeted error injection tool
- Loading branch information
Showing
4 changed files
with
628 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
.TH inject 8 "2018-03-16" "USER COMMANDS" | ||
.SH NAME | ||
inject \- injects appropriate error into function if input call chain and | ||
predicates are satisfied. Uses Linux eBPF/bcc. | ||
.SH SYNOPSIS | ||
.B trace -h [-I header] [-v] | ||
.SH DESCRIPTION | ||
inject injects errors into specified kernel functionality when a given call | ||
chain and associated predicates are satsified. | ||
|
||
WARNING: This tool injects failures into key kernel functions and may crash the | ||
kernel. You should know what you're doing if you're using this tool. | ||
|
||
This makes use of a Linux 4.16 feature (bpf_override_return()) | ||
|
||
Additionally, use of the kmalloc failure mode is only possible with | ||
|
||
commit f7174d08a5fc ("mm: make should_failslab always available for | ||
fault injection") | ||
|
||
which is in mm-tree but not yet in mainline (as of 4.16-rc5). | ||
|
||
Since this uses BPF, only the root user can use this tool. | ||
.SH REQUIREMENTS | ||
CONFIG_BPF, CONFIG_BPF_KPROBE_OVERRIDE, bcc | ||
.SH OPTIONS | ||
.TP | ||
\-h | ||
Print usage message. | ||
.TP | ||
\-v | ||
Display the generated BPF program, for debugging or modification. | ||
.TP | ||
\-I header | ||
Necessary headers to be included. | ||
.SH EXAMPLES | ||
Please see inject_example.txt | ||
.SH SOURCE | ||
This is from bcc. | ||
.IP | ||
https://github.com/iovisor/bcc | ||
.PP | ||
Also look in the bcc distribution for a companion _examples.txt file containing | ||
example usage, output, and commentary for this tool. | ||
.SH OS | ||
Linux | ||
.SH STABILITY | ||
Unstable - in development. | ||
.SH AUTHOR | ||
Howard McLauchlan |
Oops, something went wrong.