Re: LKPK (Live Kernel Patching Kit)

Rogier Wolff (
Sun, 26 Jul 1998 08:58:50 +0200 (MEST)

Adam Sulmicki wrote:
> Christer Weinigel writes:
> ->You can't change the addresses of variables or functions if the only
> ->information you have available is the file. The addresses
> ->of variables and functions in the kernel are resolved at link time and
> ->are encoded in the instructions themselves.
> "address of var encoded into instruction themselves".
> I realized that a while after I wrote my post :(

It is not that bad. "insmod" must be doing the same thing. You can
load a module into the running kernel, and the external variables will
be resolved in the same way.

When I wrote the first "modules" implementation, I had a script modify
"" into an assembly program that simply had all the variable
declarations, together with "org" statements to put them at the right
spot. If you compile that, you have an "object" to link against which
doesn't hold any code, but will cause all variables to be resolved
to the right address.

I -=THINK=- that insmod does the resolving/linking by itself. I didn't
want to write a new linker....


Actor asks a collegue: "To what do you owe your success in acting?"
Answer: "Honesty. Once you've learned how to fake that, you've got it made."
-------- Custom Linux device drivers for sale! Call for a quote. ----------
Email: || Tel: +31-15-2137555 || FAX: +31-15-2138217

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at