lkml.org 
[lkml]   [2017]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 7/7] DWARF: add the config option
From
Date
On 05/19/17 13:53, Josh Poimboeuf 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, possibly
>> derived from DWARF, or more likely, generated by objtool. After doing
>> some rough calculations, I think the section size would be comparable to
>> the sizes of the DWARF .eh_frame sections it would replace.
>>
>> If it worked, the "undwarf" unwinder would be a lot simpler than a real
>> DWARF unwinder. And validating the sanity of the data at runtime would
>> be a lot more straightforward. It could ensure that each stack pointer
>> is within the bounds of the current stack, like our current unwinder
>> does.
>
> I've been hacking away at this, and so far it's working well. The code
> is much simpler than a DWARF unwinder. Right now the kernel piece is
> only ~350 lines of code. The vast majority of the changes are in
> objtool.
>
> It's now successfully unwinding through entry code and most other asm
> files, dumping entry regs, dealing with aligned stacks, dynamic stacks,
> etc.
>
> Here's the struct in its current state:

How are you handling control flow?

-hpa

\
 
 \ /
  Last update: 2017-05-19 23:02    [W:0.257 / U:20.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site