LWN.net Logo

Ksplice: kernel patches without reboots

Ksplice: kernel patches without reboots

Posted Apr 30, 2008 8:49 UTC (Wed) by tialaramex (subscriber, #21167)
In reply to: Ksplice: kernel patches without reboots by Jel
Parent article: Ksplice: kernel patches without reboots

What you're talking about is called "hooking" and is much older than the Amiga. It's also the
technique used to create background programs in MS DOS, and to live patch some operating
systems a decade or so before the Amiga.

There have been tools that hooked the Linux kernel for a long time, but generally they're
frowned on. For example, there's an old program written by Russinovich IIRC that hooks the
file-related syscalls so that it can tell you which programs are opening and closing specific
files. The /right/ way to do this is to instrument the functions rather than trying to hook
them in this way and so in a modern Linux kernel that's what's provided.

Ksplice isn't hooking, it's a little more subtle, the objective is to actually alter the code
in place, rather than just patching the address of a function. This means that the result,
when it works, should be more robust.

LD_PRELOAD affects the userspace environment by configuring the runtime linker, the Amiga
doesn't have anything analogous to that, but then it forces everything into a single shared
address space, so allowing LD_PRELOAD type tricks would cause all sorts of problems on an
Amiga.


(Log in to post comments)

Ksplice: kernel patches without reboots

Posted May 1, 2008 4:25 UTC (Thu) by lysse (guest, #3190) [Link]

> What you're talking about is called "hooking" and is much older than the Amiga. It's also
the technique used to create background programs in MS DOS

Indeed, DOS itself does it to the BIOS.

However, as the allusion to seizing all processors in a system illustrates, that bit probably
isn't the interesting bit of the patent; on the other hand, whilst SMP may not have been a big
concern for the PDP-11, DEC does hold quite a lot of prior art around the whole subject of
SMP, thanks to the PDP-10 series; if a technique was used on the '11, chances are it was
worked out on the '10.

And of course, the developer of NT would know about that, given his history (even if the '10
team did disdain him for his "small system thinking").

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds