From: mru@kth.se (Måns Rullgård)
To: Marc Giger <gigerstyle@gmx.ch>
Cc: linux-kernel@vger.kernel.org
Subject: Re: kernel unaligned acc on Alpha
Date: Sun, 29 Feb 2004 23:36:48 +0100 [thread overview]
Message-ID: <yw1xishp1pj3.fsf@kth.se> (raw)
In-Reply-To: <20040229230318.493034b2.gigerstyle@gmx.ch> (Marc Giger's message of "Sun, 29 Feb 2004 23:03:18 +0100")
Marc Giger <gigerstyle@gmx.ch> writes:
> Hi Måns,
>
> On Sun, 29 Feb 2004 22:24:45 +0100
> mru@kth.se (Måns Rullgård) wrote:
>
>> Marc Giger <gigerstyle@gmx.ch> writes:
>>
>> > Hi All,
>> >
>> > I have a lot of unaligned accesses in kernel space:
>> >
>> > kernel unaligned acc : 2191330
>> > (pc=fffffffc002557d8,va=fffffffc00256059)
>> >
>> > It seems to be located in the networking part (iptables?) from the
>> > kernel. Can someone please help me how to find the location of these
>> > uac's? I already have recompiled the kernel with debugging enabled
>> > and tried to debug it with gdb.
>>
>> Find the matching function in System.map. Look for the entry with the
>> highest address less than or equal to the pc value.
>
> The highest address in System.map is
> fffffc000076fab0 A _end
>
> /proc/ksyms is more informative. It seems the function is in a
> module.
Yes, of course.
> fffffffc00254800 ipt_unregister_table [ip_tables]
> fffffffc00256051 __insmod_ip_tables_S.rodata_L16 [ip_tables]
That seems to support my suspicion that something is doing unaligned
accesses of static data.
> ipt_unregister_table is the most matching funtion, but makes no sense to
> me, since I don't load and unload it 2191330 times:-)
There is probably some function after ipt_unregister_table in the
source code that is not being exported from the object file.
> Do you have more tips how to find the right funtion in the modules?
Disassemble (objdump -s) the module and look for load or store
instructions with the same page offset as the reported pc value, in
this case 0x17d8. You'll want to compile with debugging symbols so
you get the function names printed even for static functions.
Another thing is to look for casts to (int *) or (long *) in the
source code. There's often one somewhere close to the unaligned
access. You might also check where static data is being accessed.
Depending on the amount of static data and the number of accesses this
might be more trouble than it's worth.
BTW, which kernel version is this?
--
Måns Rullgård
mru@kth.se
next prev parent reply other threads:[~2004-03-01 9:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-29 20:55 Marc Giger
2004-02-29 21:24 ` Måns Rullgård
2004-02-29 22:03 ` Marc Giger
2004-02-29 22:36 ` Måns Rullgård [this message]
2004-02-29 23:06 ` Marc Giger
2004-02-29 22:22 ` Andrew Morton
2004-02-29 22:27 ` Marc Giger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yw1xishp1pj3.fsf@kth.se \
--to=mru@kth.se \
--cc=gigerstyle@gmx.ch \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®