Re: [patch 8/8] stacktrace filtering for fault-injection capabilities

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux