public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* RE: kallsyms_lookup_name not exported
@ 2006-09-26 23:34 Stone, Joshua I
  2006-09-27  0:53 ` Frank Ch. Eigler
  0 siblings, 1 reply; 6+ messages in thread
From: Stone, Joshua I @ 2006-09-26 23:34 UTC (permalink / raw)
  To: David Wilder, systemtap

On Tuesday, September 26, 2006 4:27 PM, David Wilder wrote:
> I pulled a new kernel from redhat and discovered that
> kallsyms_lookup_name() is no-longer exported.  kallsyms_lookup_name is
> used by the runtime so I get an error when loading modules.
> 
> # dmesg | tail
> kernel: stap_23183: Unknown symbol kallsyms_lookup_name
> 
> Anyone know the story as to why this export was removed, or what I am
> doing wrong.

I don't know the 'why', but looking at kernel-2.6.18-1.2689.fc6.src.rpm,
linux-2.6-kprobes-portable.patch removes the export.  It also defines a
new macro 'kprobe_lookup_name', which is again not usable by modules.

The symbol is still exported in the main git tree...


Josh

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

* Re: kallsyms_lookup_name not exported
  2006-09-26 23:34 kallsyms_lookup_name not exported Stone, Joshua I
@ 2006-09-27  0:53 ` Frank Ch. Eigler
  0 siblings, 0 replies; 6+ messages in thread
From: Frank Ch. Eigler @ 2006-09-27  0:53 UTC (permalink / raw)
  To: Stone, Joshua I; +Cc: David Wilder, systemtap


> > Anyone know the story as to why this export was removed [...]

This is some unfortunate fallout from certain denizens of LKML who
were of the opinion that "the only legitimate users of kallsyms_lookup
were kprobes" (and explicitly not systemtap), and appeared to insist
that kprobes do the kallsyms* lookup internally.  Then they got the
module export removed.  I argued the issue at the time.

> [...] The symbol is still exported in the main git tree...

Not for long.

Either we will need to reopen this issue on LKML, or the runtime will
need to stop trying to use kallsyms* and instead rely in the symbol
table provided by the systemtap translator.

- FChE

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

* Re: kallsyms_lookup_name not exported
  2006-09-27  1:36 Stone, Joshua I
  2006-09-27 18:14 ` Martin Hunt
@ 2006-09-28  1:26 ` Li Guanglei
  1 sibling, 0 replies; 6+ messages in thread
From: Li Guanglei @ 2006-09-28  1:26 UTC (permalink / raw)
  To: Stone, Joshua I; +Cc: fche, David Wilder, systemtap

Stone, Joshua I wrote:
> On Tuesday, September 26, 2006 5:53 PM, fche@redhat.com wrote:
>>> [...] The symbol is still exported in the main git tree...
>> Not for long.
>>
>> Either we will need to reopen this issue on LKML, or the runtime will
>> need to stop trying to use kallsyms* and instead rely in the symbol
>> table provided by the systemtap translator.
> 
> From what I can see, we use kallsyms_lookup_name in a few places to
> locate functions that aren't exported.  That's not behavior that good
> kernel citizens should follow!  We're hooking __kernel_text_address and
> kallsyms_lookup, so we can map an address back to a function name.  So
> shouldn't we be asking for those exports instead?
> 
> We are trying to do legitimate things, and we could ask for the tools to
> help us.  But right now we're using kallsyms_lookup_name to hack our way
> into the kernel, and I don't blame anyone if that isn't well received.
> 
> 
> Josh

Currently LKET supports 3 timing methods: get_cycles(), sched_clock() 
and do_gettimeofday(). sched_clock() is not exported by Kernel so I 
use kallsyms_lookup_name to locate it. So I either ask Kernel to 
export sched_clock() or delete sched_clock() timing method from LKET. 
But anyway, at present I have to comment out sched_clock() relate 
codes from LKET to avoid a compiling error

- Guanglei

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

* RE: kallsyms_lookup_name not exported
  2006-09-27  1:36 Stone, Joshua I
@ 2006-09-27 18:14 ` Martin Hunt
  2006-09-28  1:26 ` Li Guanglei
  1 sibling, 0 replies; 6+ messages in thread
From: Martin Hunt @ 2006-09-27 18:14 UTC (permalink / raw)
  To: Stone, Joshua I; +Cc: fche, David Wilder, systemtap

On Tue, 2006-09-26 at 18:36 -0700, Stone, Joshua I wrote:
> On Tuesday, September 26, 2006 5:53 PM, fche@redhat.com wrote:
> >> [...] The symbol is still exported in the main git tree...
> > 
> > Not for long.
> > 
> > Either we will need to reopen this issue on LKML, or the runtime will
> > need to stop trying to use kallsyms* and instead rely in the symbol
> > table provided by the systemtap translator.
> 
> From what I can see, we use kallsyms_lookup_name in a few places to
> locate functions that aren't exported.  That's not behavior that good
> kernel citizens should follow!  

Just one function and it really is no longer necessary. I'll check in a
fix.

Martin


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

* RE: kallsyms_lookup_name not exported
@ 2006-09-27  1:36 Stone, Joshua I
  2006-09-27 18:14 ` Martin Hunt
  2006-09-28  1:26 ` Li Guanglei
  0 siblings, 2 replies; 6+ messages in thread
From: Stone, Joshua I @ 2006-09-27  1:36 UTC (permalink / raw)
  To: fche; +Cc: David Wilder, systemtap

On Tuesday, September 26, 2006 5:53 PM, fche@redhat.com wrote:
>> [...] The symbol is still exported in the main git tree...
> 
> Not for long.
> 
> Either we will need to reopen this issue on LKML, or the runtime will
> need to stop trying to use kallsyms* and instead rely in the symbol
> table provided by the systemtap translator.

From what I can see, we use kallsyms_lookup_name in a few places to
locate functions that aren't exported.  That's not behavior that good
kernel citizens should follow!  We're hooking __kernel_text_address and
kallsyms_lookup, so we can map an address back to a function name.  So
shouldn't we be asking for those exports instead?

We are trying to do legitimate things, and we could ask for the tools to
help us.  But right now we're using kallsyms_lookup_name to hack our way
into the kernel, and I don't blame anyone if that isn't well received.


Josh

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

* kallsyms_lookup_name not exported
@ 2006-09-26 22:49 David Wilder
  0 siblings, 0 replies; 6+ messages in thread
From: David Wilder @ 2006-09-26 22:49 UTC (permalink / raw)
  To: systemtap

I pulled a new kernel from redhat and discovered that 
kallsyms_lookup_name() is no-longer exported.  kallsyms_lookup_name is 
used by the runtime so I get an error when loading modules.

# dmesg | tail
kernel: stap_23183: Unknown symbol kallsyms_lookup_name

Anyone know the story as to why this export was removed, or what I am 
doing wrong.

-- 
David Wilder
IBM Linux Technology Center
Beaverton, Oregon, USA 
dwilder@us.ibm.com
(503)578-3789

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

end of thread, other threads:[~2006-09-28  1:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-26 23:34 kallsyms_lookup_name not exported Stone, Joshua I
2006-09-27  0:53 ` Frank Ch. Eigler
  -- strict thread matches above, loose matches on Subject: below --
2006-09-27  1:36 Stone, Joshua I
2006-09-27 18:14 ` Martin Hunt
2006-09-28  1:26 ` Li Guanglei
2006-09-26 22:49 David Wilder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).