public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: Christoph Hellwig <hch@infradead.org>
Cc: David Smith <dsmith@redhat.com>,
	linux-kernel@vger.kernel.org, rusty@rustcorp.com.au,
	prasanna@in.ibm.com, ananth@in.ibm.com,
	anil.s.keshavamurthy@intel.com, davem@davemloft.net
Subject: Re: [PATCH] module interface improvement for kprobes
Date: 05 Aug 2006 17:10:10 -0400	[thread overview]
Message-ID: <y0mmzaianyl.fsf@ton.toronto.redhat.com> (raw)
In-Reply-To: <20060805113538.GA21135@infradead.org>


Christoph Hellwig <hch@infradead.org> writes:

> [...]
> > Why shouldn't I put a probe into a module other than at a symbol I can
> > find with kallsyms?  For example, I'm interested when a particular
> > module hits an error condition that occurs.  [...]
>
> How do you find that offset?  

The same way one would find an address now: by a mixture of
online/offline processing of symbol tables, debugging data, and/or
disassembly.

> You'll probably mention the S-Word but we really want something that
> works with the latest kernel, not just the vendor trees.

Why are you under the impression that systemtap doesn't work with any
particular "latest kernel"?

> [...] Adding another field to struct kprobe to specify an offset
> into the symbol would be the logical extension of that.

At the top you ask rhetorically about how an offset would be found (as
if it were difficult) ...  and here you assert that it is a logical
extension to put it into the API?  I'm confused - which is it?

> > Your example works for a very small number of symbols, but with a large
> > number it could take a long time to register the kprobes.  [...]
> Registering a kprobe is everything but a fastpath, and you definitly
> should not have a lot of probes anyway.  [...]

It is not difficult to imagine situations where one wants to have
hundreds or thousands of active probes: one is function entry/exit
tracing; another is assertion checking.  (If only there was a system
for conveniently expressing these ... oh never mind.)

The idea behind module_get_byname() was to avoid changes in kprobes
etc., and keeping in mind that the same sort of module-name lookup is
already available to userspace via sysfs.  If folks insist that
instead, kprobes be extended to do this step of the probe address
calculations internally, I guess we could use that too.  It would have
to punt if !CONFIG_KALLSYMS, which is too bad, since systemtap and
kprobes work fine without kallsyms now.

- FChE

  reply	other threads:[~2006-08-05 21:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-04 15:17 [PATCH] module interface improvement for kprobes David Smith
2006-08-04 15:57 ` Christoph Hellwig
2006-08-04 18:30   ` David Smith
2006-08-05 11:35     ` Christoph Hellwig
2006-08-05 21:10       ` Frank Ch. Eigler [this message]
2006-08-07  4:52   ` Ananth N Mavinakayanahalli
2006-08-07  5:05     ` Ananth N Mavinakayanahalli
2006-08-08 15:39     ` David Smith
2006-08-04 16:00 ` Randy.Dunlap
2006-08-04 19:51   ` David Smith
2006-08-05  2:28 ` Rusty Russell
  -- strict thread matches above, loose matches on Subject: below --
2006-08-04 23:00 Chuck Ebbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=y0mmzaianyl.fsf@ton.toronto.redhat.com \
    --to=fche@redhat.com \
    --cc=ananth@in.ibm.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=davem@davemloft.net \
    --cc=dsmith@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=prasanna@in.ibm.com \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox