On Wed, 21 Feb 2007, Tzahi Fadida wrote:

Hi,
Is it possible to replace a function in the kernel (using a module) without
recompiling. This function is an exported function. Basically i wish to
extend a functionality of a function (without asking for a stub at this
point). Specifically the function void submit_bio(int rw, struct bio *bio)
in /block/ll_rw_blk.c
Not that i can't recompile the kernel, it is just that i want to create a
module that would be able to be distributed with more convenience.

The idea, of course, is to call the submit_bio using the new function but also
do other stuff afterward.

Basically i wish to extend the functionallity of block_dump (for fun and study
purposes) to be centralized in some /proc entry with some stats.

I remember that this is described in the linux drivers books or someplace like that. Afaik it involves moving the code of the original function or something like that. It is a two step process, with a loader stub doing some work, then the actual new function is loaded and patched (?) in.

Peter

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to