Messages in this thread | | | From | "Jones D (ISaCS)" <> | Subject | RE: QUESTION: modifying kernel functions in a running kernel | Date | Tue, 20 Jul 1999 17:51:55 +0100 |
| |
> > 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?
> 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
This is starting to remind me of a function call that existed in AmigaOS called SetFunction(). It allowed runtime patching of operating system functions, which was all well and good. The only problem with it was that would be perhaps many different patches for the same routine. One fixes one bug, one fixes another etc..
The only way around this problem is nesting patches (ie, calling the previous function) This can be real ugly, and in many cases caused crashes as patches were not written to comply with each other.
So the end result is that if you have >1 bug fix patch you'd need to reboot anyway, nullifying the reason for the whole mechanism.
I'm aware that there were some 'managers' that handled patch nesting better than the default, but I never saw a perfect one in the many years that I used an Amiga.
(The machine may be a memory, but the OS lives on in my mind :-)
regards,
Dave.
- 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/
| |