Re: QUESTION: modifying kernel functions in a running kernel

John Alvord (jalvo@mbay.net)
Tue, 20 Jul 1999 09:35:48 -0700 (PDT)


There was a comment about this a few months ago. Basically someone wanted
to change a basic function. They changed all references to the function to
be calls to a function address. The function address was set at init time
to the common usage. From a module, they could reach in an put a
different address, which everyone would then call. john

On Tue, 20 Jul 1999, noupe wrote:

> 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/
>

-
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/