This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Make kernel DWARF unwinder work with ksalr.
Hi Mark,
> Am 24.04.2018 um 11:21 schrieb Mark Wielaard <mark@klomp.org>:
>
> Hi Torsten,
>
> On Mon, 2018-04-23 at 22:20 +0200, Torsten Polle wrote:
>> Am 22.04.2018 um 23:09 schrieb Mark Wielaard <mark@klomp.org>:
>>> On Sun, 2018-04-22 at 10:52 +0200, Torsten Polle wrote:
>>>> The only difference is that you leave out the alignment of s-
>>>>> static_addr.
>>>> s->static_addr is equal to „_stext“, which is 0xc9600358 on my test instance.
>>>> While s->sec_load_offset is aligned to 0xc1000000 in a particular run. This
>>>> results in a misaligned offset. While on X86 and ARM64, the offset is aligned.
>>>> Without the alignment, I get strange results.
>>>>
>>>> Arguably I choose a hard coded value 0x1fffff. Actually it should be based on
>>>> CONFIG_PHYSICAL_ALIGN on X86, but on ARM64 it is hard coded as well.
>>>
>>> On my system it is 0x200000 and it looks like sec_load_offset is
>>> already aligned to that, which explains why it seems to work for me.
>>
>> sec_load_offset is aligned to 0x200000. The problem is the
>> „misalignment" of static_addr, which results in an offset that is not
>> aligned. The problem is also difficult to spot. As a lot of results
>> show nice call stacks.
>
> 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
>
> Thanks,
>
> Mark
My test system runs on i386. The results are as follows.
objdump reports
c1000358 g .text 00000000 _stext
/proc/kallsyms reports
ce400358 T _stext
I will check on my X86_64 and arm64 systems. But that has to wait until tomorrow.
Regards,
Torsten