Re: [PATCH 7/7] DWARF: add the config option
Date: Sun May 07 2017 - 18:01:08 EST
On May 7, 2017 10:59:16 AM PDT, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>* Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
>> One instance of the structure would exist for each time the stack
>> pointer changes, e.g. for every function entry, push/pop, and rsp
>> add/subtract. The data could be assembled and sorted offline,
>> derived from DWARF, or more likely, generated by objtool. After
>> some rough calculations, I think the section size would be comparable
>> the sizes of the DWARF .eh_frame sections it would replace.
>That's something I've been thinking about as well: if objtool generates
>unwinder data structures then the kernel is not directly exposed to
>A fair chunk of the fragility of DWARF comes from the fact that it's
>a tool chain that we cannot fix as part of the kernel project. If GCC
>crap debuginfo, and GDB happens to work with it but the kernel not,
>we'll have to
>work it around in the kernel. If GCC starts bloating debuginfo in the
>are screwed as well, etc.
>If objtool generates debuginfo then it's _our_ responsibility to have
>unwinder info and we obviously manage its structure and size as well.
>The unwinder itself should still do sanity checks, etc. (like all good
>infrastructure code) - but the nature of the kernel's exposure to tool
>details changes in a very fundamental way.
>So yes, I think this is a very good idea, assuming it works in
Can objtool verify the unwinder at each address in the kernel, or is that an AI-complete problem?
Sent from my Android device with K-9 Mail. Please excuse my brevity.