From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>, systemtap@sourceware.org
Subject: Re: [RFC] systemtap: begin the process of using proper kernel APIs (part1: use kprobe symbol_name/offset instead of address)
Date: Tue, 15 Jul 2008 14:52:06 -0500 [thread overview]
Message-ID: <1216151526.3312.102.camel@localhost.localdomain> (raw)
In-Reply-To: <y0mr69vj5p0.fsf@ton.toronto.redhat.com>
On Tue, 2008-07-15 at 15:41 -0400, Frank Ch. Eigler wrote:
> James Bottomley <James.Bottomley@HansenPartnership.com> writes:
>
> > One of the big nasties of systemtap is the way it tries to embed
> > virtually the entirety of the kernel symbol table in the probe
> > modules it constructs.
>
> It is a compromise of conflicting requirements.
Well ... in order to make forward progress, since the systemtap people
expressed a desire to be better integrated with the kernel, the first
order of business is to use the correct APIs ... that has to happen even
before an evaluation can be made of which pieces of the systemtap
runtime should move into the kernel.
> > This is highly undesirable because it represents a subversion of the
> > kernel API to gain access to unexported symbols.
>
> Please elaborate. Does the translator or its runtime use unexported
> symbols? (That would arouse the question about why.)
>
> Or are you talking about being able to *probe* unexported functions or
> access unexported data? That would be a deliberate feature.
No ... I'm talking about _stp_module_relocate() at this point. It's an
unnecessary function, since the kprobes API provides a way to attach to
a symbol and an offset. The API allows access to unexported functions.
> > At least for kprobes, the correct way to do this is to specify the
> > probe point by symbol and offset.
>
> But there won't be just kprobes. Much of this code was built with
> anticipation of user-space probing, and there the kernel won't have a
> similar mechanism. Similarly, the code is written to work with old
> kernels too - ones that predate the symbol+offset kprobe API.
OK ... you've got me there ... why would user space probing necessitate
resolution of kernel space symbols? Surely you plan to use an exported
module API of utrace or whatever the agreed framework is?
> Unless someone is about to rip out pure address-based kprobes, I see
> no reason to complicate the code.
If you actually look, you'll see that pure addressed based kprobes still
work.
Also, I think you'll find it simplifies the code, since tons of the
runtime junk that duplicate the in-kernel symbol resolution can be
thrown out, plus the corresponding pieces of systemtap that have to
worry about this.
There's also the architectural worry: this scheme you currently use is
very fragile. For instance, I don't see it surviving a move to
-ffunction-sections (which patches are already going over linux-arch).
James
next prev parent reply other threads:[~2008-07-15 19:52 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1216146802.3312.95.camel__45052.4692344063$1216146917$gmane$org@localhost.localdomain>
2008-07-15 19:41 ` Frank Ch. Eigler
2008-07-15 19:52 ` James Bottomley [this message]
2008-07-15 20:07 ` Frank Ch. Eigler
2008-07-15 20:24 ` James Bottomley
2008-07-15 22:18 ` Frank Ch. Eigler
2008-07-16 2:06 ` James Bottomley
2008-07-16 10:56 ` Frank Ch. Eigler
2008-07-16 14:56 ` James Bottomley
2008-07-15 18:33 James Bottomley
2008-07-16 22:40 ` Masami Hiramatsu
2008-07-16 23:03 ` James Bottomley
2008-07-17 0:05 ` Masami Hiramatsu
2008-07-17 1:49 ` James Bottomley
2008-07-17 14:18 ` James Bottomley
2008-07-17 16:58 ` James Bottomley
2008-07-17 21:36 ` Masami Hiramatsu
2008-07-17 22:03 ` James Bottomley
2008-07-21 14:20 ` James Bottomley
[not found] ` <1216313914.5515.25.camel__21144.9282979176$1216314027$gmane$org@localhost.localdomain>
2008-07-17 18:30 ` Frank Ch. Eigler
2008-07-17 20:12 ` James Bottomley
2008-07-17 20:26 ` Frank Ch. Eigler
2008-07-17 21:06 ` James Bottomley
2008-07-17 21:33 ` Frank Ch. Eigler
2008-07-17 22:03 ` Masami Hiramatsu
2008-07-22 18:00 ` Rik van Riel
2008-07-22 18:11 ` Frank Ch. Eigler
2008-07-22 18:31 ` Peter Zijlstra
[not found] ` <1216751477.7257.115.camel__19834.5970632092$1216751567$gmane$org@twins>
2008-07-22 18:48 ` Frank Ch. Eigler
2008-07-18 9:11 ` Andi Kleen
2008-07-18 9:23 ` Peter Zijlstra
2008-07-18 10:31 ` Andi Kleen
2008-07-18 10:44 ` Peter Zijlstra
2008-07-18 10:52 ` Andi Kleen
2008-07-18 13:02 ` Frank Ch. Eigler
2008-07-18 13:07 ` Andi Kleen
2008-07-18 13:10 ` Peter Zijlstra
2008-07-18 13:28 ` Frank Ch. Eigler
2008-07-18 13:35 ` Andi Kleen
2008-07-18 13:21 ` James Bottomley
2008-07-18 13:37 ` Frank Ch. Eigler
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=1216151526.3312.102.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=fche@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=systemtap@sourceware.org \
/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
Powered by JetHome