Re: [patch 8/8] stacktrace filtering for fault-injectioncapabilities
From: Don Mullis
Date: Tue Sep 19 2006 - 02:01:33 EST
Undo temporary fix-up for clean application of patch
"[patch 8/8] stacktrace filtering for fault-injection capabilities".
Fix bug in !(CONFIG_STACK_UNWIND || CONFIG_STACKTRACE) case, based on
code inspection only. Anyone with a non-i386, -x86_64, -s390 willing
to test this?
Reintroduce stacktrace-specific documentation, factored out earlier.
Signed-off-by: Don Mullis <dwm@xxxxxxxx>
---
Documentation/fault-injection/fault-injection.txt | 13 +++++++++++++
include/linux/fault-inject.h | 2 +-
lib/fault-inject.c | 2 +-
3 files changed, 15 insertions(+), 2 deletions(-)
Index: linux-2.6.17/lib/fault-inject.c
===================================================================
--- linux-2.6.17.orig/lib/fault-inject.c
+++ linux-2.6.17/lib/fault-inject.c
@@ -136,7 +136,7 @@ static int fail_stacktrace(struct fault_
#else
-#define fail_stacktrace(attr) (0)
+#define fail_stacktrace(attr) (1)
#endif
Index: linux-2.6.17/Documentation/fault-injection/fault-injection.txt
===================================================================
--- linux-2.6.17.orig/Documentation/fault-injection/fault-injection.txt
+++ linux-2.6.17/Documentation/fault-injection/fault-injection.txt
@@ -61,6 +61,19 @@ configuration of fault-injection capabil
A negative value means that failures are enabled for
pid==-process_filter irrespective of /proc/<pid>/make-it-fail.
+- /debug/*/stacktrace-depth:
+
+ specifies the maximum stacktrace depth walked during search
+ for a caller within [address-start,address-end). A value of 0
+ disables the stacktrace filter.
+
+- /debug/*/address-start:
+- /debug/*/address-end:
+
+ specifies the range of virtual addresses tested during
+ stacktrace walking. Failure is injected only if some caller
+ in the walked stacktrace lies within this range.
+
o Boot option
In order to inject faults while debugfs is not available (early boot time),
Index: linux-2.6.17/include/linux/fault-inject.h
===================================================================
--- linux-2.6.17.orig/include/linux/fault-inject.h
+++ linux-2.6.17/include/linux/fault-inject.h
@@ -16,7 +16,7 @@ struct fault_attr {
atomic_t times;
atomic_t space;
unsigned long count;
- u32 process_filter;
+ atomic_t process_filter;
unsigned long stacktrace_depth;
unsigned long address_start;
unsigned long address_end;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/