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

Andi Kleen
2006-10-16T09:56:53Z

> Index: work-fault-inject/lib/Kconfig.debug
> ===================================================================
> --- work-fault-inject.orig/lib/Kconfig.debug
> +++ work-fault-inject/lib/Kconfig.debug
> @@ -401,6 +401,8 @@ config LKDTM
>
> config FAULT_INJECTION
> bool
> + select STACKTRACE
> + select FRAME_POINTER

I'm afraid this won't work fully reliably on i386/x86-64 at least. The problem
is that if even with frame pointers the new unwinder will try its unwinding
first and if it gets stuck it will log the fallback entries into the stack
trace buffer too. And those fallback entries can be randomly everything left over
from previous stack traces. Then the fault injection will be more
like Russian roulette and could randomly hit other code paths too.

To make this work there would need to be some way to turn off fallback
for these particular stack traces.

Or maybe just always use frame pointer
there, but even that will likely not help because the few places
where the dwarf2 unwinder still gets stuck (usually assembly code)
are usually broken with frame pointers too.

-Andi