public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* kallsyms_lookup_name should return the text addres
@ 2006-01-10 20:39 Anil S Keshavamurthy
  2006-01-10 20:39 ` [patch 1/2] [BUG]kallsyms_lookup_name " Anil S Keshavamurthy
  2006-01-10 20:39 ` [patch 2/2] Link new module to the tail of module list Anil S Keshavamurthy
  0 siblings, 2 replies; 12+ messages in thread
From: Anil S Keshavamurthy @ 2006-01-10 20:39 UTC (permalink / raw)
  To: Linux Kernel, akpm; +Cc: tony.luck, Systemtap, Jim Keniston, Keith Owens

On architectures like IA64, kallsyms_lookup_name(name) returns
the actual text address corresponding to the "name" and sometimes
returns address of the function descriptor, the behavior is
not consistent.

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.

Example:
Here is the output of cat /proc/kallsyms when we have test1.ko using the
my_test_reentrant_export_function.
-----------------------------------------------------------------
a00000020008c090 U my_test_reentrant_export_function    [test1]
a00000020008c0a0 r __ksymtab_my_test_reentrant_export_function  [mon_dummy]
a00000020008c0b0 r __kstrtab_my_test_reentrant_export_function  [mon_dummy]
a00000020008c0d8 r __kcrctab_my_test_reentrant_export_function  [mon_dummy]
00000000a356bab8 a __crc_my_test_reentrant_export_function      [mon_dummy]
a00000020008c000 T my_test_reentrant_export_function    [mon_dummy]
---------------------------------------------------------------

When we have test1.ko loaded, 
kallsyms_lookup_name(my_test_reentrant_export_function)
returns 0xa00000020008c090 which is a function descriptor address and 
when test1.ko is removed
kallsyms_lookup_name(my_test_reentrant_export_function)
returns 0xa00000020008c000 which is the actual text address

The patch following this mail fixes this issue.

-Anil Keshavamurthy


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-01-11  2:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-10 20:39 kallsyms_lookup_name should return the text addres Anil S Keshavamurthy
2006-01-10 20:39 ` [patch 1/2] [BUG]kallsyms_lookup_name " Anil S Keshavamurthy
2006-01-10 20:45   ` Paulo Marques
2006-01-10 21:07     ` Keshavamurthy Anil S
2006-01-10 23:11       ` Keith Owens
2006-01-10 23:29         ` Keshavamurthy Anil S
2006-01-11  0:02           ` Keith Owens
2006-01-11  0:07             ` Randy.Dunlap
2006-01-11  0:23               ` Keith Owens
2006-01-11  0:39                 ` Keshavamurthy Anil S
2006-01-11  2:26                   ` Frank Ch. Eigler
2006-01-10 20:39 ` [patch 2/2] Link new module to the tail of module list Anil S Keshavamurthy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox