QUESTION: modifying kernel functions in a running kernel

noupe (nv98nowi@egy.engelholm.se)
Tue, 20 Jul 1999 17:47:34 +0200


Is it possible to change a function (not a syscall) which is public
(i.e shown in /proc/ksyms) from a module? Something like changing the
address to the function so my function will be called instead of the
public one?

Let's assume that there's a bug in icmp_send() and that you just can't
(i.e don't want to) reboot the machine (as you have to when installing
a new kernel) for some reason..

If you don't patch it, your machine will crash, sooner or later.
If you patch it, you have to reboot the machine.
But what if you could load a module that exchange the old icmp_send()
with the one present in your module?
Instead of rebooting your machine, you could just load a module that
fixes the problem.

So, my questions are:
Is this in any way possible to do a thing like this?
If yes, what techniques could one use? And is it possible
to change functions that aren't public/exported?

Thanks in advance, noupe.

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