* kernel unaligned acc on Alpha
@ 2004-02-29 20:55 Marc Giger
2004-02-29 21:24 ` Måns Rullgård
0 siblings, 1 reply; 7+ messages in thread
From: Marc Giger @ 2004-02-29 20:55 UTC (permalink / raw)
To: linux-kernel
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.
Another question: What's the meaning of va?
Thank you very much!
Regards
Marc
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: kernel unaligned acc on Alpha
2004-02-29 20:55 kernel unaligned acc on Alpha Marc Giger
@ 2004-02-29 21:24 ` Måns Rullgård
2004-02-29 22:03 ` Marc Giger
2004-02-29 22:22 ` Andrew Morton
0 siblings, 2 replies; 7+ messages in thread
From: Måns Rullgård @ 2004-02-29 21:24 UTC (permalink / raw)
To: linux-kernel
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.
> Another question: What's the meaning of va?
It's the virtual memory address being accessed. The va value is
rather close to the pc, so I would guess that it is some static data
from the same source file as the function that is being accessed.
--
Måns Rullgård
mru@kth.se
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: kernel unaligned acc on Alpha
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
2004-02-29 23:06 ` Marc Giger
2004-02-29 22:22 ` Andrew Morton
1 sibling, 2 replies; 7+ messages in thread
From: Marc Giger @ 2004-02-29 22:03 UTC (permalink / raw)
To: Måns Rullgård; +Cc: linux-kernel
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.
fffffffc00254800 ipt_unregister_table [ip_tables]
fffffffc00256051 __insmod_ip_tables_S.rodata_L16 [ip_tables]
ipt_unregister_table is the most matching funtion, but makes no sense to
me, since I don't load and unload it 2191330 times:-)
Do you have more tips how to find the right funtion in the modules?
>
> > Another question: What's the meaning of va?
>
> It's the virtual memory address being accessed. The va value is
> rather close to the pc, so I would guess that it is some static data
> from the same source file as the function that is being accessed.
Thank you very much for your help!
Regards
Marc
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: kernel unaligned acc on Alpha
2004-02-29 21:24 ` Måns Rullgård
2004-02-29 22:03 ` Marc Giger
@ 2004-02-29 22:22 ` Andrew Morton
2004-02-29 22:27 ` Marc Giger
1 sibling, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2004-02-29 22:22 UTC (permalink / raw)
To: Måns Rullgård; +Cc: linux-kernel
mru@kth.se (Måns Rullgård) wrote:
>
> > 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.
If this is 2.6, that message should be augmented to use print_symbol().
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: kernel unaligned acc on Alpha
2004-02-29 22:22 ` Andrew Morton
@ 2004-02-29 22:27 ` Marc Giger
0 siblings, 0 replies; 7+ messages in thread
From: Marc Giger @ 2004-02-29 22:27 UTC (permalink / raw)
To: Andrew Morton; +Cc: Måns Rullgård, linux-kernel
On Sun, 29 Feb 2004 14:22:18 -0800
Andrew Morton <akpm@osdl.org> wrote:
> mru@kth.se (Måns Rullgård) wrote:
> >
> > > 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.
>
> If this is 2.6, that message should be augmented to use
> print_symbol().
It's 2.4, and accessed via /proc/cpuinfo.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: kernel unaligned acc on Alpha
2004-02-29 22:03 ` Marc Giger
@ 2004-02-29 22:36 ` Måns Rullgård
2004-02-29 23:06 ` Marc Giger
1 sibling, 0 replies; 7+ messages in thread
From: Måns Rullgård @ 2004-02-29 22:36 UTC (permalink / raw)
To: Marc Giger; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: kernel unaligned acc on Alpha
2004-02-29 22:03 ` Marc Giger
2004-02-29 22:36 ` Måns Rullgård
@ 2004-02-29 23:06 ` Marc Giger
1 sibling, 0 replies; 7+ messages in thread
From: Marc Giger @ 2004-02-29 23:06 UTC (permalink / raw)
To: Marc Giger; +Cc: Måns Rullgård, linux-kernel
On Sun, 29 Feb 2004 23:03:18 +0100
Marc Giger <gigerstyle@gmx.ch> wrote:
> 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.
>
> fffffffc00254800 ipt_unregister_table [ip_tables]
> fffffffc00256051 __insmod_ip_tables_S.rodata_L16 [ip_tables]
>
> ipt_unregister_table is the most matching funtion, but makes no sense
> to me, since I don't load and unload it 2191330 times:-)
>
> Do you have more tips how to find the right funtion in the modules?
>
Ok, I found it, because in 2.4.25 (2.6 too) is already fixed.
It would be nice if you could explain me how to find a function in a
module with the given address.
Thank you and sorry for wasting your time!
Regards
Marc
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-03-01 9:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-29 20:55 kernel unaligned acc on Alpha 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
2004-02-29 23:06 ` Marc Giger
2004-02-29 22:22 ` Andrew Morton
2004-02-29 22:27 ` Marc Giger
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®