This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make kernel DWARF unwinder work with ksalr.


Hi Torsten,

On Tue, 2018-04-24 at 21:30 +0200, Torsten Polle wrote:
> OK, so the sec_load_offset which we set at translation time from
> > the
> > on-disk addresses is "good". But the static_addr of the kernel/_stext
> > section that is set at runtime based on the _stext symbol gotten from
> > /proc/kallsyms is off/wrong/unaligned.
> > 
> > That is surprising.
> > You are seeing this on i386 and arm64, but not x86_64?
> > 
> > Could you on those systems grep _stext /proc/kallsyms to see what that
> > reports as _stext address?
> > 
> > For me (on x86_64, 3.10.0-862.el7.x86_64) it is:
> > ffffffff83e00000 T _stext
> > 
> 
> My test system runs on i386. The results are as follows.
> objdump reports
> > c1000358 g       .text	00000000 _stext
> 
> /proc/kallsyms reports
> ce400358 T _stext

O... Thanks for giving both.
But that looks like _stext isn't the start of the kernel module/section
address space. I wonder if that might cause other issues.

My understanding is that we relocate against _stext because we assume
that creates all addresses relative to the vmlinux core memory
placement. But if _stext isn't at the exact start...

So we probably also need to look at the exact addresses that
sec_load_offset and static_addr have in runtime/unwind.c
(adjustStartLoc). If you could print them out with something like
_dbug("sec_load_offset: %lx, static_addr: %lx\n",
      s->name, s->sec_load_offset, s->static_addr);
for the "kernel" case we can be sure whether they really are matched
with the _stext symbol or the section load address.

Thanks,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]