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: [patch 1/2] [BUG]kallsyms_lookup_name should return the text addres


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?


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