This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [patch 1/2] [BUG]kallsyms_lookup_name should return the text addres
- From: Paulo Marques <pmarques at grupopie dot com>
- To: Anil S Keshavamurthy <anil dot s dot keshavamurthy at intel dot com>
- Cc: Linux Kernel <linux-kernel at vger dot kernel dot org>, akpm at osdl dot org, tony dot luck at intel dot com, Systemtap <systemtap at sources dot redhat dot com>, Jim Keniston <jkenisto at us dot ibm dot com>, Keith Owens <kaos at sgi dot com>
- Date: Tue, 10 Jan 2006 20:45:02 +0000
- Subject: Re: [patch 1/2] [BUG]kallsyms_lookup_name should return the text addres
- Organization: Grupo PIE
- References: <20060110203912.007577046@csdlinux-2.jf.intel.com> <20060110204045.712982192@csdlinux-2.jf.intel.com>
Anil S Keshavamurthy wrote:
[...]
The bug is kallsyms_lookup_name() -> module_kallsyms_lookup_name(mod, name)
search the name in the given module and returns the address when
name is matched. This address very well could be the address of 'U' type
which is different address than 't' type.
[...]
for (i = 0; i < mod->num_symtab; i++)
- if (strcmp(name, mod->strtab+mod->symtab[i].st_name) == 0)
+ if ((strcmp(name, mod->strtab+mod->symtab[i].st_name) == 0) &&
+ (mod->symtab[i].st_info == 't'))
This conflicts with a similar patch from Keith Owens earlier this week.
In his patch he did "mod->symtab[i].st_info != 'U'" instead of
"mod->symtab[i].st_info == 't'".
I actually prefer Keith's version as it is the one which solves the bug
by changing as least as possible the current behavior.
--
Paulo Marques - www.grupopie.com
Pointy-Haired Boss: I don't see anything that could stand in our way.
Dilbert: Sanity? Reality? The laws of physics?