aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/fault-injection
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-12-08 05:39:48 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:29:03 -0500
commit329409aeda064c4aff00c51f837fcd3bbdaeeba6 (patch)
treed22890da0d4f8d9f37bb1e9344cf41387a0a23f9 /Documentation/fault-injection
parentf4f154fd920b2178382a6a24a236348e4429ebc1 (diff)
[PATCH] fault injection: stacktrace filtering
This patch provides stacktrace filtering feature. The stacktrace filter allows failing only for the caller you are interested in. For example someone may want to inject kmalloc() failures into only e100 module. they want to inject not only direct kmalloc() call, but also indirect allocation, too. - e100_poll --> netif_receive_skb --> packet_rcv_spkt --> skb_clone --> kmem_cache_alloc This patch enables to detect function calls like this by stacktrace and inject failures. The script Documentaion/fault-injection/failmodule.sh helps it. The range of text section of loaded e100 is expected to be [/sys/module/e100/sections/.text, /sys/module/e100/sections/.exit.text) So failmodule.sh stores these values into /debug/failslab/address-start and /debug/failslab/address-end. The maximum stacktrace depth is specified by /debug/failslab/stacktrace-depth. Please see the example that demonstrates how to inject slab allocation failures only for a specific module in Documentation/fault-injection/fault-injection.txt [dwm@meer.net: reject failure if any caller lies within specified range] Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Don Mullis <dwm@meer.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/fault-injection')
-rw-r--r--Documentation/fault-injection/fault-injection.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/Documentation/fault-injection/fault-injection.txt b/Documentation/fault-injection/fault-injection.txt
index cf075c20eda0..6d6e5ac5ea92 100644
--- a/Documentation/fault-injection/fault-injection.txt
+++ b/Documentation/fault-injection/fault-injection.txt
@@ -73,13 +73,17 @@ configuration of fault-injection capabilities.
73 Any positive value limits failures to only processes indicated by 73 Any positive value limits failures to only processes indicated by
74 /proc/<pid>/make-it-fail==1. 74 /proc/<pid>/make-it-fail==1.
75 75
76- /debug/*/address-start: 76- /debug/*/require-start:
77- /debug/*/address-end: 77- /debug/*/require-end:
78- /debug/*/reject-start:
79- /debug/*/reject-end:
78 80
79 specifies the range of virtual addresses tested during 81 specifies the range of virtual addresses tested during
80 stacktrace walking. Failure is injected only if some caller 82 stacktrace walking. Failure is injected only if some caller
81 in the walked stacktrace lies within this range. 83 in the walked stacktrace lies within the required range, and
82 Default is [0,ULONG_MAX) (whole of virtual address space). 84 none lies within the rejected range.
85 Default required range is [0,ULONG_MAX) (whole of virtual address space).
86 Default rejected range is [0,0).
83 87
84- /debug/*/stacktrace-depth: 88- /debug/*/stacktrace-depth:
85 89