[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.20.1705092040370.26873@cbobk.fhfr.pm>
Date: Tue, 9 May 2017 20:47:50 +0200 (CEST)
From: Jiri Kosina <jikos@...nel.org>
To: Josh Poimboeuf <jpoimboe@...hat.com>
cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Jiri Slaby <jslaby@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>,
live-patching@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
the arch/x86 maintainers <x86@...nel.org>,
Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH 7/7] DWARF: add the config option
On Sun, 7 May 2017, Josh Poimboeuf wrote:
> DWARF is great for debuggers. It helps you find all the registers on
> the stack, so you can see function arguments and local variables. All
> expressed in a nice compact format.
>
> But that's overkill for unwinders. We don't need all those registers,
> and the state machine is too complicated.
OTOH if we make the failures in processing of those "auxiliary"
information non-fatal (in a sense that it neither causes kernel bug nor
does it actually corrupt the unwinding process, but the only effect is
losing "optional" information), having this data available doesn't hurt.
It's there anyway for builds containing debuginfo, and the information is
all there so that it can be used by things like gdb or crash, so it seems
natural to re-use as much as possible of it.
> Unwinders basically only need to know one thing: given an instruction
> address and a stack pointer, where is the caller's stack frame?
Again, DWARF should be able to give us all of this (including the
FP-fallback etc). It feels a bit silly to purposedly ignore it and
reinvent parts of it again, instead of fixing (read: "asking toolchain
guys to fix") the cases where we actually are not getting the proper data
in DWARF. That's a win-win at the end of the day.
Thanks,
--
Jiri Kosina
SUSE Labs
Powered by blists - more mailing lists