mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Karim Yaghmour <karim@opersys.com>
To: Werner Almesberger <wa@almesberger.net>
Cc: Richard J Moore <richardj_moore@uk.ibm.com>,
	Rob Landley <landley@trommello.org>,
	linux-kernel@vger.kernel.org,
	S Vamsikrishna <vamsi_krishna@in.ibm.com>
Subject: Re: 2.4 Ready list - Kernel Hooks
Date: Wed, 23 Oct 2002 12:21:05 -0400	[thread overview]
Message-ID: <3DB6CC71.9DA9A543@opersys.com> (raw)
In-Reply-To: <20021023122841.G1421@almesberger.net>


Werner Almesberger wrote:
> Richard J Moore wrote:
> > This is nothing more than a call-back mechanism such as could be used by
> > LSM or LTT.
> 
> Hmm, Greg has already voiced some violent disagreement regarding
> LSM :-) That leaves LTT. Given the more exploratory nature of LTT,
> I wonder if [dk]probes wouldn't be quite sufficient there, too.

The whole point of tracing is that the system's behavior should not
be modified but only recorded. Generating int3 won't do.

> Oh, you could probably have some "fast" probes by just checking
> for a certain "anchor" pattern (e.g. a sequence of 5 nops on
> i386), which could then be replaced with a direct call. This
> optimization would have to be optional, in case some code yields
> the anchor pattern such that it isn't also a basic block.

If I remember correctly, the optimized arch-dependent code in kernel
hooks uses "compare immediate" and the value of the immediate is
edited to enable/disable hooking. Given modern branch-prediction the
cost should be quite close to an unconditional jump.

Karim

===================================================
                 Karim Yaghmour
               karim@opersys.com
      Embedded and Real-Time Linux Expert
===================================================

  reply	other threads:[~2002-10-23 16:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-22 23:09 Richard J Moore
2002-10-22 23:54 ` Greg KH
2002-10-23 15:28 ` Werner Almesberger
2002-10-23 16:21   ` Karim Yaghmour [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-10-24 16:38 Richard J Moore
2002-10-24 17:02 ` Greg KH
2002-10-23 16:47 Richard J Moore
2002-10-23 19:50 ` Werner Almesberger
2002-10-24  7:38   ` Vamsi Krishna S .
2002-10-24 17:22     ` Werner Almesberger
2002-10-23  8:10 Richard J Moore
2002-10-23 17:09 ` Greg KH
2002-10-21 12:24 Richard J Moore
2002-10-22 21:02 ` Werner Almesberger

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=3DB6CC71.9DA9A543@opersys.com \
    --to=karim@opersys.com \
    --cc=landley@trommello.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richardj_moore@uk.ibm.com \
    --cc=vamsi_krishna@in.ibm.com \
    --cc=wa@almesberger.net \
    /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