linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-08 20:31 richardj_moore
  2000-11-08 21:35 ` Michael Rothwell
  2000-11-13 21:56 ` Advanced Linux Kernel/Enterprise Linux Kernel Josue Emmanuel Amaro
  0 siblings, 2 replies; 75+ messages in thread
From: richardj_moore @ 2000-11-08 20:31 UTC (permalink / raw)
  To: linux-kernel



We've just release version 0.6 of Generalised Kernel Hooks Interface (GKHI)
see the IBM Linux Technology Centre's web page DProbes link:
http://oss.software.ibm.com/developerworks/opensource/linux

Some folks expressed an interest in this type of facility recently in
discussions concerning making call-backs from the kernel to kernel modules.

Here's the abstract for this facility. With this intend to modularise our
RAS offerings, in particular DProbes, so that they can be applied
dynamically without having to be carried as excess baggage.

Abstract:
Generalised Kernel Hooks Interface (GKHI) is a generalised facility for
placing hooks or exits in arbitrary kernel locations. It enables many
kernel enhancements, which are  otherwise self-contained, to become
loadable kernel modules and retain a substantial degree of independence
from the kernel source. This affords advantages for maintenance and
co-existence with other kernel enhancements. The hook interface allows
multiple kernel modules to register their exits for a given hook, in order
to receive control at that hook location. Multiple hooks may be defined
within the kernel and a singe kernel module may register exits to use
multiple hooks.  When hook exits register they may specify co-existence
criteria. Hooks may be placed in kernel modules as well as the kernel
itself with the proviso that the modules with hooks are loaded before the
gkhi hook interfacing module. A hook exit receives control as if called
from the code in which the hook is located. Parameters may be passed to a
hook exit and may be modified by an exit. For more information down-load
the tarball.

Note: GHKI is in late beta test - we currently do not support SMP, that
will occur soon. We also plan to support dynamic hook definition as little
later on so that kernel modules may dynamically register hooks for other
kernel modules to use.


Richard Moore -  RAS Project Lead - Linux Technology Centre (PISC).

http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-09  7:43 richardj_moore
  2000-11-09 11:24 ` Christoph Rohland
  0 siblings, 1 reply; 75+ messages in thread
From: richardj_moore @ 2000-11-09  7:43 UTC (permalink / raw)
  To: Christoph Rohland; +Cc: Michael Rothwell, linux-kernel



Let be clear about one thing: the GKHI make no statement about enabling
proprietary extensions and that's a common misconception. GKHI is intended
to make optional facilities easier to co-install and change. We designed it
for DProbes, and when modularised will remain a GPL opensource offering.

The only motivation for providing GKHI is to make the kernel more
acceptable to the enterprise customer, but allowing, for example, RAS
capabilities to be brough in easily and dynmaically. This type of customer
will not readily succome to on-the-fly kernel rebuilds to diagnose problems
that occur only in complex production environments.

If anything opens the door to proprietary extensions it's the loadable
kernel modules capability or perhaps the loose wording of the GPL which
doesn't catch loadable kernel modules, or whatever... Bottom line GKHI
really has no bearing on this.


Richard Moore -  RAS Project Lead - Linux Technology Centre (PISC).

http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


Christoph Rohland <cr@sap.com> on 09/11/2000 07:44:11

Please respond to Christoph Rohland <cr@sap.com>

To:   Michael Rothwell <rothwell@holly-springs.nc.us>
cc:   Richard J Moore/UK/IBM@IBMGB, linux-kernel@vger.kernel.org
Subject:  Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)




Hi Michael,

On Wed, 08 Nov 2000, Michael Rothwell wrote:
> Sounds great; unfortunately, the core group has spoken out against a
> modular kernel.
>
> Perhaps IBM should get together with SGI, HP and other interested
> parties and start an Advanced Linux Kernel Project. Then they can
> run off and make their scalable, modular, enterprise kernel and the
> Linus Version can always merge back in features from it.

*Are you crazy?* =:-0

Proposing proprietary kernel extensions to establish an enterprise
kernel? No thanks!

Greetings
          Christoph




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-09 14:02 Jesse Pollard
  0 siblings, 0 replies; 75+ messages in thread
From: Jesse Pollard @ 2000-11-09 14:02 UTC (permalink / raw)
  To: lm, Christoph Rohland; +Cc: Michael Rothwell, richardj_moore, linux-kernel

Larry McVoy <lm@bitmover.com>:
> On Thu, Nov 09, 2000 at 08:44:11AM +0100, Christoph Rohland wrote:
> > Hi Michael,
> > 
> > On Wed, 08 Nov 2000, Michael Rothwell wrote:
> > > Sounds great; unfortunately, the core group has spoken out against a
> > > modular kernel.
> > > 
> > > Perhaps IBM should get together with SGI, HP and other interested
> > > parties and start an Advanced Linux Kernel Project. Then they can
> > > run off and make their scalable, modular, enterprise kernel and the
> > > Linus Version can always merge back in features from it.
> > 
> > *Are you crazy?* =:-0 
> > 
> > Proposing proprietary kernel extensions to establish an enterprise
> > kernel? No thanks!
> 
> Actually, I think this idea is a good one.  I'm a big opponent of all the
> big iron feature bloat getting into the kernel, and if SGI et al want to
> go off and do their own thing, that's fine with me.  As long as Linus 
> continues in his current role, I doubt much of anything that the big iron
> boys do will really make it back into the generic kernel.  Linus is really
> smart about that stuff, are least it seems so to me; he seems to be well
> aware that 99.9999% of the hardware in the world isn't big iron and never
> will be, so something approximating 99% of the effort should be going towards
> the common platforms, not the uncommon ones.

Not strictly true... Many of the capabilities in Linux now came from what
was "big iron" 10 years ago. At the rate that CPU speeds/multi-CPU systems
are becoming available, the current "big iron" will be on your desk, sharing
data among many other systems to solve even bigger problems.

I happen to be a proponent of big iron features...  Just let ME choose which
ones I need, and which I don't.

I already need MLS and VPN support with encryption (IPSec + more :). When my
SGI workstation gets replaced (by a Linux PC) I'll want to be able to
administer (securely) the security structures supported by Cray UNICOS,
Trusted Solaris and Trusted IRIX.

Currently, I have to downgrade the security of the Cray systems just to
administer it (not good, but currently acceptable by the Powers That Be).

I want better. Better security, better authentication, better identification,
secure communication, and auditability. All of this is currently part of "big
iron", but is needed in the commercial world. IPSec is beginning to be called
for in business. MLS is already used there, and I think its use will only
expand. Anything that makes an improvement in this area is needed.

I believe that having the hooks might make it easier to implement higher
levels of security by option. It will certainly make it easer to test
new features. Include a module that attaches to hooks already present --
Other users wouldn't need the module. So let it be an option.

Linux already runs on big iron. Why not support it.

<joke>Anything that can put pressure on M$ ...</joke>

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-10 10:57 richardj_moore
  2000-11-10 13:45 ` Alexander Viro
  0 siblings, 1 reply; 75+ messages in thread
From: richardj_moore @ 2000-11-10 10:57 UTC (permalink / raw)
  To: Alexander Viro
  Cc: Michael Rothwell, Christoph Rohland, Larry McVoy, linux-kernel




> The problem with the hooks et.al. is very simple - they promote every
> bloody implementation detail to exposed API. ....

Surely not, having the kernel source does that. The alternative to the hook
is embed a patch in the kernel source.  What proveds greater exposure to
internals: hooks of source?


Richard Moore -  RAS Project Lead - Linux Technology Centre (PISC).

http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-10 10:57 richardj_moore
  0 siblings, 0 replies; 75+ messages in thread
From: richardj_moore @ 2000-11-10 10:57 UTC (permalink / raw)
  To: Lars Marowsky-Bree; +Cc: Michael Rothwell, Christoph Rohland, linux-kernel





>>  Why? I think the IBM GKHI code would be of tremendous value. It would
....
>
> And we already refuse to support those kernels - your point being?
>
> Making this "commonplace" is a nightmare. Go away with that.


How is so?


Richard Moore -  RAS Project Lead - Linux Technology Centre (PISC).

http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-10 10:57 richardj_moore
  0 siblings, 0 replies; 75+ messages in thread
From: richardj_moore @ 2000-11-10 10:57 UTC (permalink / raw)
  To: Christoph Rohland; +Cc: Michael Rothwell, linux-kernel




> Yes, and that's why I am opposing here: Technically you are right, but
> proposing that enterprise Linux should go this way is inviting binary
> only modules due to the lax handling of modules.

Not so sure it does. If a kernel module wants to make use of GKHI then it
will have to

1) include a GKHI header file or copy some of the code in it,
2) Update kernel source in a minimal way to add the callbacks

Wouldn't 1) under GPL terms force the kernel module to be  GPL?



Richard Moore -  RAS Project Lead - Linux Technology Centre (PISC).

http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-10 11:17 richardj_moore
  0 siblings, 0 replies; 75+ messages in thread
From: richardj_moore @ 2000-11-10 11:17 UTC (permalink / raw)
  To: Alan Cox; +Cc: Michael Rothwell, Christoph Rohland, linux-kernel





>> extensions using the GKHI would not be breaking the license agreement, I
>> don't think. There's lots of binary modules right now -- VMWare, Aureal
> sound card drivers, etc.
>
>All of which just cause large numbers of bugs to go in the bitbucket
because
>nobody can tell whose the problem is.


I don't understand your point - are you saying that the existence of kernel
modules causes makes problems more difficult to solve. Why would that be?


Richard Moore -  RAS Project Lead - Linux Technology Centre (PISC).

http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-10 11:41 richardj_moore
  2000-11-10 16:24 ` Theodore Y. Ts'o
  0 siblings, 1 reply; 75+ messages in thread
From: richardj_moore @ 2000-11-10 11:41 UTC (permalink / raw)
  To: Theodore Y. Ts'o
  Cc: Paul Jakma, Michael Rothwell, Christoph Rohland, linux-kernel




> That being said, the real problem with the GKHI is that as Al said, it
> does expose internal kernel interfaces --- and the Linux kernel
> development community as a whole refuses to be bound by such interfaces,
> sometimes even during a stable kernel series.

I'm not sure that GKHI exposes any more interfaces than embedding a patch
directly into the kernel would.

It has the potential to to make patches easier to re-work for different
kernel versions, and to enable development maintence and fixing of the
patch to be done independently of a kernel build. And it also has the
potential of helping with co-existence. If for example the RAS community
could agree on a number of hooks (I'm thinking here of crash dump, trace,
dprobes and maybe KDB as well) then you'd probably find a good may on them
using then same hooks. The modifications to the kernel would be minimal and
the user would be left an easy means of installing a co-existing subset of
the offerings supported by hooks.

An example: DProbes is down to three hooks - that's three lines of code in
the kernel + three lines in ksyms.c

Patching DProbes onto any custom kernel is a doddle.


Richard Moore -  RAS Project Lead - Linux Technology Centre (PISC).

http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-10 16:08 richardj_moore
  0 siblings, 0 replies; 75+ messages in thread
From: richardj_moore @ 2000-11-10 16:08 UTC (permalink / raw)
  To: Theodore Y. Ts'o
  Cc: Theodore Y. Ts'o, Paul Jakma, Michael Rothwell,
	Christoph Rohland, linux-kernel




> Right.  So what you're saying is that GKHI is adding complexity to the
> kernel to make it easier for peopel to put in non-standard patches which
> exposes non-standard interfaces which will lead to kernels not supported
> by the Linux Kernel Development Community.  Right?

I don't think I mentioned complexity - in what was do you mean adding
complexity? If you mean addition funciton then yes. If you mean kernel
source modificaiton then no. If you mean the mechanism then it's nothing
special - just what a loader does when it fixes up an external reference.

> But if there are no standard hooks in the mainline kernel, it's going to
> be hard to pursuade people that adding the GKHI would be a good thing.
> So for the purposes of getting GKHI into the kernel, argueing for GKHI
> in the abstract is putting the card before the horse.  What I would
> recommend is showing how certain hooks are good things to have in the
> mainline kernel, and to try to pursuade people of that question first.
> Only then try to argue for GKHI.

Quite agree, there are no standard hooks, no hooks at all in fact. I'm
neither seeking to get this accepted or not accepted into the kernel. What
it does do is give me an easier time both as a developer and an installer
when I want to include some rarefied code additions. GKHI was developed
primarily for DProbes.

> P.S.  There are some such RAS features which I wouldn't be surprised
> there being interest in having integrated into the kernel directly
> post-2.4,

Great!

Richard Moore -  RAS Project Lead - Linux Technology Centre (PISC).

http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-10 18:42 richardj_moore
  0 siblings, 0 replies; 75+ messages in thread
From: richardj_moore @ 2000-11-10 18:42 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Theodore Y. Ts'o, Paul Jakma, Michael Rothwell,
	Christoph Rohland, linux-kernel



No, misunderstood.

GKHI is not implemented using dynamic probes.  GKHI places in the kernel
calls to APIs in the DProbes code. Since we'ed rather have Dprobes out of
the kernel then essentially it acts as a loader after the fact, i.e. it
fixes up the DProbes API calls when the DProbe module loads. Compare this
with the usual loading process where the fix-ups are done in the module
being loaded. Now, you might want to ask me why I want DProbes as a module?
They again you might not. Either way is fine by me ;-)


Richard Moore -  RAS Project Lead - Linux Technology Centre (PISC).

http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


Andi Kleen <ak@suse.de> on 10/11/2000 16:54:05

Please respond to Andi Kleen <ak@suse.de>

To:   "Theodore Y. Ts'o" <tytso@MIT.EDU>
cc:   Richard J Moore/UK/IBM@IBMGB, Paul Jakma <paulj@itg.ie>, Michael
      Rothwell <rothwell@holly-springs.nc.us>, Christoph Rohland
      <cr@sap.com>, linux-kernel@vger.kernel.org
Subject:  Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)




On Fri, Nov 10, 2000 at 11:24:28AM -0500, Theodore Y. Ts'o wrote:
> Right.  So what you're saying is that GKHI is adding complexity to the
> kernel to make it easier for peopel to put in non-standard patches which
> exposes non-standard interfaces which will lead to kernels not supported
> by the Linux Kernel Development Community.  Right?

My understanding is that GKHI does not change the kernel at all, except
for the three hooks needed for dprobes. All GKHI hooks are implemented
as dynamic probes, which are just like debugger breakpoints.
A dynamic probes breakpoint does not require any source
changes, but you have to check the assembly to find the right point for
them (at least in the current version, I don't know if IBM is planning
to support source level dprobes using the debugging information)

IMHO GKHI does not make mainteance of additional modules any easier,
because
you always have to recheck the assembly if the dynamic probe still fits
(which may in some cases even be more work than reporting source patches,
it is also harder when you want to cover multiple architectures)

It will just help some people who have a unrational aversion against kernel
recompiles and believe in vendor blessed binaries.


-Andi




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-10 19:31 richardj_moore
  0 siblings, 0 replies; 75+ messages in thread
From: richardj_moore @ 2000-11-10 19:31 UTC (permalink / raw)
  To: Matti Aarnio; +Cc: Michael Rothwell, linux-kernel



Matti,


>    Please educate me, what does "our RAS offerings" mean here ?
>    (I didn't find "RAS" at your signature-URL site, but I didn't
>     poke around very much..)

RAS = Reliabilty, Availability & Serviceability = those things that are are
not mainline to an OS but add the qualities named in the acronym. That
includes self-healing, recoverability, diagnosis etc..
My specialism is in probelm diagnosis. When I say RAS I generally mean
debugging/diagnosis aids, but I also mean it not from a developement
standpoint but from a support standpoint. Which depending on how a system
is deployed can be very different things.

>    I do know that when IBM suits speak with phrases like that,
>    they are selling me something which costs $$$.

No always. All this stuff (Linux RAS) is free and given away under GPL. And
I'm not waring a suit either ;-) RAS in general is not sexy, it's difficult
to sell. So it's pad for from after sales service and other indirect means.

>    Which definitely gives proprietary, binary only, hook image...
>    But GKHI, and DProbes are neither. Thus I am confused, but can
>    understand the furor...

Well I sort of can and can't as well. Here's a couple of circumstances
where I'd find GKHI useful:

I'm developing DProbes, I need the SGI KDB, a complex patch, as a debugging
aid. I also want to keep up with various kernel version. I've got limited
time so would like to spend it on DProbes on not re-working patches. So, I
know that DProbes only needs to get control in three places in kernel
processing:
1) Trap 1 handler
2) Trap 3 handler
3) Pagefault handler.

I reason that if I had a call inserted into the kernel source at these
points to respective entry points in my DProbes code I'd not have to spend
much time integrating SGI's KDB with DProbes.
The I realise if I leave the calls nop'd and dynamically patch them in
later I can build the kernel once and re-build DProbes (now a module) many
times over - and sometimes without re-booting.

So I create GKHI to mess around with NOPs converitng them into calls.

Second scenario:
I have a customer running Linux for a business purpose. They are not
developers and have no programming skill. Every now and again their system
crashes and they have to reboot. And down time costs them in real terms.

So they say to IBM, you supplied this ... system, you fix it. OK we say,
we'll need a dump. We'll send you a kernel with SGI's crash dump built in.
On no you won't they say, you're not sending us any more dodgy code until
you've fixed this problem. Anyway the server is in a secure remote branch
office. There's no technoical support on site and we cannot possibly have
developers messing with that system. Now suppose SGI or IBM have converted
SGI Kernel Crash Dump to a module and we supplly the system customised with
a few GKHI hooks in place. Then we say issue the following command: insmod
lkcd.o

We get a dump and discover that some cheesehead had overlaid a spinlock
causing re-entrancy and a crash. OK we say we know what happened by not who
did it. So, we need to trace all storage alterations to the spin-lock.
There are only a few valid user's of that spin-lock, which if we had a
trace, we could eliminate. By now DProbes and Linux Trace Toolkit are
working well together, and providing a dynamic trace capability. Also
DProbes is now offering the capability of probes on storage modifications.
So we say to the customer please issue three commands: insmod lkcd; insmod
dprobes; insmod ltt;

The system crashes, we get the trace. We duly find the address from which
the spin-lock was overwriten. We look in the dump and find it's a routine
in a device driver that's been passed invalid data, but actually, not
passed, but placed on a work queue. And furthermore the invalid data has a
particular look to it.

We explain to the customer that we now need just one more pice of
information. So finally we place a dprobe on the enqueuing routine, looking
at data enqueued until the invalid pattern occurs and make the probe
trigger another dump.

And finally we have it. The enqueuing routine was another driver .....

This scenario is not untypical of the sort of problem I earnt my living
solving for the past n years.

Now we could have supplied a system with Crash Dump, Dprobes, LTT, KDB, a
dozen other specialised RAS tools. The kernel would have 50% bigger, cost
us considerable time and effort whenever kernel maintenance was applied -
with obvious consequences. And in the end 99.9% of the time we don't need
these facilities, coz after all Linux is a pretty stable platform. So why
not allow them to be brought in dynamically.



Richard Moore -  RAS Project Lead - Linux Technology Centre (PISC).

http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-12 23:27 richardj_moore
  2000-11-13 10:38 ` Andi Kleen
  0 siblings, 1 reply; 75+ messages in thread
From: richardj_moore @ 2000-11-12 23:27 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Theodore Y. Ts'o, Paul Jakma, Michael Rothwell,
	Christoph Rohland, linux-kernel




Andi Kleen wrote:
> It will just help some people who have a unrational aversion against
kernel
>recompiles and believe in vendor blessed binaries.


An interesting remark Andi, especially in the light of your note to me
regarding your use of DProbes - i.e. you'd rather use DProbes to dump out
some info from the kernel than recompile it with printks.

I don't have an aversion to recompiling the kernel - it's great fun - I
love watching all the meeages go by, waiting with bated breath for a
compile error, which never seems to happen. Just like watching the National
Lottery, waiting for your own numbers to come up.

To be a little more serious, it's not recompilation that's a problem, its
re-working a set of (non-standard) patches together. I'm not that excited
by that - I'd rather develop new code than rework old. Anyway for a couple
of  example scenarios see the response I made to Michael Rothwell.  And by
the way, I absolutely agree with your approach to kernel problem solving -
but wouldn't it be a help if you didn't have to put a large or even
moderate effort into working the DProbes patch into some hot-off-the-press
version of the kernel?

Richard


Richard Moore -  RAS Project Lead - Linux Technology Centre (PISC).

http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-13  5:52 richardj_moore
  0 siblings, 0 replies; 75+ messages in thread
From: richardj_moore @ 2000-11-13  5:52 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Michael Rothwell, linux-kernel



Alexander Viro wrote:
> It's not a good idea, it's an obvious fact. Oh, you mean forking the
tree?

Again I find your terminology at odds with mine; what do you mean by
forking the tree? I get the impression that it's a very restrictive notion
where any functional ehancement applied as a patch on top of a standard
distribution kernel is considered by you as forking? Is that so? (And BTW
by patch I mean input to the patch command.)


Richard Moore -  RAS Project Lead - Linux Technology Centre (PISC).

http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-14  1:34 richardj_moore
  0 siblings, 0 replies; 75+ messages in thread
From: richardj_moore @ 2000-11-14  1:34 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Theodore Y. Ts'o, Paul Jakma, Michael Rothwell,
	Christoph Rohland, linux-kernel



Andi Kleen wrote:
>I think using dprobes for collecting information is ok, but when you want
>to do actual actions with it (not only using it as a debugger) IMHO it
>is better to patch and recompile the kernel.

I absolutely agree. The only time I ever used this capability was to modify
a proprietary binary, for which I did not have the source, so that I could
prove to the owner what needed fixing.

>As far as I can see GKHI is overkill for dprobes alone, the existing
>notifier lists would be sufficient because dprobes does not hook into any
>performance critical paths.

Again, I agree. My intent is that the RAS guys might club together - then
GKHI make much more sense.



Richard Moore -  RAS Project Lead - Linux Technology Centre (PISC).

http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-15 15:22 richardj_moore
  0 siblings, 0 replies; 75+ messages in thread
From: richardj_moore @ 2000-11-15 15:22 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: Josue.Amaro, linux-kernel




Andrea,

I am very greatful for your detailed analysis. I have yet to digest
everything you commented but will get back to you on all points you raise
very soon. Here are my thoughts so far:

> I think gkhi should be renamed to something like "Fast Unregistered
Kernel
> Hook Interface" to avoid confusion and wrong usage of it that would
otherwise
> leads to lower performance.



A fair point.


On point 3):

> 3)
>
> gkhi apparently doesn't yet know the word "SMP" 8).


When I announced GKHI I did state that SMP support was to follow. The
updates are trivial but I didn't wan't to release the code until I had had
a chance to test it.

On point 4)

> 4)
>
> gkh_iflush should be done with flush_icache_range that is infact
implemented
> wrong for IA32 and it should be implemented as regs trashing cpuid (the
fact
> it's wrongly implemented means that in theory modules can break in IA32
> on 2.4.x 2.2.x even on UP).


Are you claiming that flush_icache_range has an error and should implement
the IA32 instruction flush as I did using CPUID? If this is the case has
this error been officially reported?

On point 5)
5)

> Current dprobes v1.1.1 against 2.2.16 cames with a syscall collision:
> sys_dprobes collides with ugetrlimit (not implemented in 2.2.x). That's
fine
> for internal use and to show the code, but make _sure_ not to ship any
binary
> to anybody implementing ugetrlimit as sys_dprobes 8).
>
> Richard please ask Linus to reserve a syscall for dprobes. I recommend to
> allocate the syscall out of the way (I mean using syscall 255 or even
better
> enlarging the syscall table from 256 to 512 and using number 511) so we
make
> sure not to waste precious dcachelines for debugging stuff.

Thanks for this information. Reserving a syscall will become irrelvant when
we release Dprobes as a module using gkhi since we will use ioctl() as the
application interface.

> BTW, for things like lkcd there's no reason to use gkhi to make it
completly
> modular since lkcd gets recalled in a completly slow path.

Well, not necessarily so while lkcd is not get accepted into the standard
kernel source. But also, even when lkcd becomes accepted, using gkhi with
lkcd will allow a crash dump capability to be actived dynamically. That
gives the user more fexibility. Even enterprise customers can sometimes
hedge their bets when it comes to RAS-like features.



Richard Moore -  RAS Project Lead - Linux Technology Centre (PISC).

http://oss.software.ibm.com/developerworks/opensource/linux
Office: (+44) (0)1962-817072, Mobile: (+44) (0)7768-298183
IBM UK Ltd,  MP135 Galileo Centre, Hursley Park, Winchester, SO21 2JN, UK


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 75+ messages in thread
* Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)
@ 2000-11-15 15:24 richardj_moore
  2000-11-15 18:20 ` Matt D. Robinson
  0 siblings, 1 reply; 75+ messages in thread
From: richardj_moore @ 2000-11-15 15:24 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: Josue.Amaro, linux-kernel




Please respond to Andrea Arcangeli <andrea@suse.de>

To:   Richard J Moore/UK/IBM@IBMGB
cc:
Subject:  Re: [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI)




On Wed, Nov 15, 2000 at 05:14:57AM +0000, richardj_moore@uk.ibm.com wrote:
>
>
> Andrea,
>
> I am very greatful for your detailed analysis. I have yet to digest
> everything you commented but will get back to you on all points you raise
> very soon. Here are my thoughts so far:

I'm glad you appreciated my comments. I think dprobes gives an higher
level of flexibility for debugging purposes and I'd really like to
include it in the aa kernels until it will be included into the mainstream.

> When I announced GKHI I did state that SMP support was to follow. The

I probably overlooked that part of your announcement, sorry.

> updates are trivial but I didn't wan't to release the code until I had
had
> a chance to test it.

Very promising.

Note that SMP could introduce non trivial issues: the self modifying
changes
should be atomic with respect of the other CPUs executing the self
modifying
code and specs are often not very explicit about side effects of self
modifying
code in SMP, it's not only a matter of implementing the GKHI locks with SMP
locks).

> Are you claiming that flush_icache_range has an error and should
implement
> the IA32 instruction flush as I did using CPUID? If this is the case has

Exactly.

> this error been officially reported?

I hope I did that in my email :). Actually when I fixed the alpha port
some month ago (alpha needs an explicit imb() to flush the speculative
icache and it was really crashing in modules because of the missing
smp_imb) I
also noticed IA32 was buggy, since also IA32 execute out of order and specs
says we must do a cpuid as only way to serialize the istream.  But I didn't
fixed IA32 because nobody ever got bitten by that race because of
timing/implementation reasons, but to be correcet we should do cpuid also
in
flush_icache_range.

Once flush_icache_range is fixed in IA32 you can use it inside GKHI too
(and then you'll get it right on all architectures).

> Thanks for this information. Reserving a syscall will become irrelvant
when
> we release Dprobes as a module using gkhi since we will use ioctl() as
the
> application interface.

Ok (still you need to reserve a blockdevice major minor number with Linus
though).

> Well, not necessarily so while lkcd is not get accepted into the standard
> kernel source. [..]

It won't until it uses a separate driver that doesn't depend on scsi or
ide layer.

Even ignoring the safety problem of scsi layer potentially corrupted by
memory corruption at crash time, the scsi layer doesn't work without being
interrupt driven. It will recurse on the stack badly if somebody ever tries
to
use it polled. Probably similar thing happens with IDE (but none IDE polled
hardware exists so we don't know). I documented all this in the `Linux
Kernel
Debugging' document on my ftp area in ftp.suse.com.

> [.] But also, even when lkcd becomes accepted, using gkhi with
> lkcd will allow a crash dump capability to be actived dynamically. [..]

We can control everything dynamically without self modifying code.

The _only_ point of self modifying code is performance. None other reason
to use it. lkcd is definitely called in an extremely slow path (infact
if all goes right it should never be recalled), so it doesn't give
any advantage to use self modifying code there.

> [..] That
> gives the user more fexibility. Even enterprise customers can sometimes
> hedge their bets when it comes to RAS-like features.

I agree that being able to enable/disable lkcd dynamically is fine
feature.

Andrea



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2000-11-15 18:45 UTC | newest]

Thread overview: 75+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-08 20:31 [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI) richardj_moore
2000-11-08 21:35 ` Michael Rothwell
2000-11-09  7:44   ` Christoph Rohland
2000-11-09  7:53     ` Larry McVoy
2000-11-09  8:08       ` Andre Hedrick
2000-11-09  8:43       ` Christoph Rohland
2000-11-09 12:20         ` Michael Rothwell
2000-11-09 12:31           ` Lars Marowsky-Bree
2000-11-09 12:40           ` Alexander Viro
2000-11-09 13:02             ` Michael Rothwell
2000-11-09 13:30               ` Alexander Viro
2000-11-09 13:39                 ` Michael Rothwell
2000-11-09 17:19                 ` Mike Coleman
2000-11-09 17:27                   ` Alexander Viro
2000-11-10 11:42                     ` Martin Dalecki
2000-11-09 13:40               ` Marco Colombo
2000-11-10  8:44           ` Christoph Rohland
2000-11-09 12:50       ` Tigran Aivazian
2000-11-09 16:03       ` Ingo Molnar
2000-11-10  8:42         ` Christoph Rohland
2000-11-09 14:28   ` Theodore Y. Ts'o
2000-11-10 15:07   ` Matti Aarnio
2000-11-10 15:24     ` Michael Rothwell
2000-11-13 21:56 ` Advanced Linux Kernel/Enterprise Linux Kernel Josue Emmanuel Amaro
2000-11-14  7:49   ` Lars Marowsky-Bree
2000-11-14 18:33   ` lamont
2000-11-09  7:43 [ANNOUNCE] Generalised Kernel Hooks Interface (GKHI) richardj_moore
2000-11-09 11:24 ` Christoph Rohland
2000-11-09 12:25   ` Michael Rothwell
2000-11-09 12:30     ` Lars Marowsky-Bree
2000-11-09 12:46       ` Michael Rothwell
2000-11-09 13:35         ` Alan Cox
2000-11-09 13:43           ` Michael Rothwell
2000-11-09 14:23             ` Theodore Y. Ts'o
2000-11-09 12:50     ` Paul Jakma
2000-11-09 12:53       ` Michael Rothwell
2000-11-09 13:39         ` Paul Jakma
2000-11-09 14:06           ` Marco Colombo
2000-11-09 14:14           ` Theodore Y. Ts'o
2000-11-09 14:26             ` Alan Cox
2000-11-09 14:37               ` Jeff Garzik
2000-11-09 20:24               ` Theodore Y. Ts'o
2000-11-09 13:31     ` Alan Cox
2000-11-09 14:02 Jesse Pollard
2000-11-10 10:57 richardj_moore
2000-11-10 13:45 ` Alexander Viro
2000-11-10 13:51   ` Michael Rothwell
2000-11-10 14:00     ` Alexander Viro
2000-11-10 14:37   ` David Lang
2000-11-10 10:57 richardj_moore
2000-11-10 10:57 richardj_moore
2000-11-10 11:17 richardj_moore
2000-11-10 11:41 richardj_moore
2000-11-10 16:24 ` Theodore Y. Ts'o
2000-11-10 16:37   ` Christoph Rohland
2000-11-10 18:36     ` Matt D. Robinson
2000-11-11  0:12       ` Theodore Y. Ts'o
2000-11-11  3:29         ` Matt D. Robinson
2000-11-11  4:57           ` Keith Owens
2000-11-11 17:58         ` tytso
2000-11-13 10:30           ` Daniel Phillips
2000-11-11 21:48         ` Lars Marowsky-Bree
2000-11-11 22:12           ` Michael Rothwell
2000-11-10 16:54   ` Andi Kleen
2000-11-10 16:08 richardj_moore
2000-11-10 18:42 richardj_moore
2000-11-10 19:31 richardj_moore
2000-11-12 23:27 richardj_moore
2000-11-13 10:38 ` Andi Kleen
2000-11-14  3:17   ` Andrea Arcangeli
2000-11-13  5:52 richardj_moore
2000-11-14  1:34 richardj_moore
2000-11-15 15:22 richardj_moore
2000-11-15 15:24 richardj_moore
2000-11-15 18:20 ` Matt D. Robinson

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 NNTP newsgroup(s).