aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Kconfig.debug
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 /lib/Kconfig.debug
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 'lib/Kconfig.debug')
-rw-r--r--lib/Kconfig.debug5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 336241bf0ced..1449ca1bf572 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -416,6 +416,11 @@ config LKDTM
416 416
417config FAULT_INJECTION 417config FAULT_INJECTION
418 bool 418 bool
419 select STACKTRACE
420 select FRAME_POINTER
421 help
422 Provide fault-injection framework.
423 For more details, see Documentation/fault-injection/.
419 424
420config FAILSLAB 425config FAILSLAB
421 bool "Fault-injection capabilitiy for kmalloc" 426 bool "Fault-injection capabilitiy for kmalloc"