Commit 6d925498 authored by Benjamin Poirier's avatar Benjamin Poirier Committed by yonghong-song

inject: Add support for alloc_page family of functions (#2114)

* inject: Add support for alloc_page family of functions

* Add vim backup files to gitignore
parent aed9b1e2
......@@ -3,6 +3,7 @@
*.swo
*.pyc
.idea
*~
# Build artifacts
/build/
......
......@@ -41,6 +41,7 @@ class Probe:
errno_mapping = {
"kmalloc": "-ENOMEM",
"bio": "-EIO",
"alloc_page" : "true",
}
@classmethod
......@@ -327,6 +328,7 @@ EXAMPLES:
error_injection_mapping = {
"kmalloc": "should_failslab(struct kmem_cache *s, gfp_t gfpflags)",
"bio": "should_fail_bio(struct bio *bio)",
"alloc_page": "should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)",
}
def __init__(self):
......@@ -334,7 +336,7 @@ EXAMPLES:
" functionality when call chain and predicates are met",
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog=Tool.examples)
parser.add_argument(dest="mode", choices=['kmalloc','bio'],
parser.add_argument(dest="mode", choices=["kmalloc", "bio", "alloc_page"],
help="indicate which base kernel function to fail")
parser.add_argument(metavar="spec", dest="spec",
help="specify call chain")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment