Replace buitlt in module on running kernel - Linux

This is a discussion on Replace buitlt in module on running kernel - Linux ; Hi all: I have several machines that run 2.4.22 but I cannot replace their kernel image. I compiled the kernel making a "make menuconfig" USB support ---> USB Human Interface Device (full HID) support [ ] HID input layer support ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Replace buitlt in module on running kernel

  1. Replace buitlt in module on running kernel

    Hi all:
    I have several machines that run 2.4.22 but I cannot replace their
    kernel image. I compiled the kernel

    making a "make menuconfig"

    USB support --->
    <*> USB Human Interface Device (full HID) support
    [ ] HID input layer support

    and now I need to add HID input layer support.

    So I need to "unload" hid.o module (but it's built in the kernel), and
    then load a new module with HID input support.

    I've read several documents like "Kernel function hijacking" to replace
    a kernel entry point, but I don't know if this is the best solution.

    Can someone tell me any document, suggestion or some help?

    Thanks to all
    Nor


  2. Re: Replace buitlt in module on running kernel

    soynor@gmail.com wrote:
    > Hi all:
    > I have several machines that run 2.4.22 but I cannot replace their
    > kernel image. I compiled the kernel
    >
    > making a "make menuconfig"
    >
    > USB support --->
    > <*> USB Human Interface Device (full HID) support
    > [ ] HID input layer support
    >
    > and now I need to add HID input layer support.
    >
    > So I need to "unload" hid.o module (but it's built in the kernel), and
    > then load a new module with HID input support.
    >
    > I've read several documents like "Kernel function hijacking" to replace
    > a kernel entry point, but I don't know if this is the best solution.
    >
    > Can someone tell me any document, suggestion or some help?


    It depends.

    If a piece of code can be selectively compiled into the kernel, you have
    good chance that it is called through (an) entry/ies in (a) table(s).
    Look for the interface of hid.o to see if this is the case (which
    functions are exported and where are they referenced? Also look at any
    data structures exported). You could then load a module which,
    carefully, replaces the pointers.

    However, sometimes you'll find
    # if defined(USE_SOME_OPTIONAL_MODULE)
    optional_modules_function(parameters);
    # endif
    I.e. calls to the optional code are compiled into other functions. This
    is difficult if not impossible to replace.

    Josef
    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett


+ Reply to Thread