Re: [PATCH v4 0/3] Compile-time stack frame pointer validation

From: Jiri Kosina
Date: Wed May 20 2015 - 15:10:24 EST


On Wed, 20 May 2015, Peter Zijlstra wrote:

> > I think it would be nice to have full DWARF unwind support for
> > everything at some point. Unfortunately, I don't see any easy path to
> > getting there. It doesn't help that AFAIK no one has ever proposed a
> > usable in-kernel DWARF unwinder.
>
> There's a bit of history here; SuSE (iirc) actually has one, however:
>
> https://lkml.org/lkml/2012/2/10/356

Oh absolutely, there are stories behind this :)

Just for the sake of completness -- the current implementation can be
found in our public GIT repository, for not-really-complete picture see
[1] [2] [3] [4].

It turned out to be rather useful on many ocasions when debugging customer
reports, but I of course also understand what Linus is saying above. The
bugs in unwinder can be *really* painful. Our experience so far has been
that it did pay off at the end of the day (and of course analyzing
stacktraces is our daily bread).

[1] http://kernel.suse.com/cgit/kernel-source/tree/patches.suse/stack-unwind?h=SLE12
[2] http://kernel.suse.com/cgit/kernel-source/tree/patches.suse/no-frame-pointer-select?h=SLE12
[3] http://kernel.suse.com/cgit/kernel-source/tree/patches.arch/stack-unwind-cfi_ignore-takes-more-arguments?h=SLE12
[4] http://kernel.suse.com/cgit/kernel-source/tree/patches.arch/x86_64-unwind-annotations?h=SLE12

--
Jiri Kosina
SUSE Labs
--
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/