Messages in this thread |  | | | Date | Sat, 24 May 2008 22:44:37 -0700 (PDT) | | From | Alex Belits <> | | Subject | Re: Inserting code from userspace to kernel space | |
On Thu, 22 May 2008, Bosko Radivojevic wrote:
> I'm looking for a way to insert code from user space to the kernel
> space, but without using kernel module. Actually, we are working on a
> system that has to allow end user to change part of code (one or two
> functions) that is executed from the kernel space.
>
> For now we have two different kernel modules, one exporting a function
> which another module uses. Process of compiling kernel module is quite
> ineligible for standard end user (along with the requirement to
> support multi platform cross compiling) compared to just cross
> compiling a simple code that doesn't use any libraries than libc.
Why? You don't have to recompile everything, just link a module before
loaing it -- a part containing the function can be one object file, the
rest of the module (a wrapper) is compiled once for a particular kernel
version, and both are linked together, producing a module valid for a
particular kenel version.
This is how most of proprietary drivers are distributed, and Ubuntu has a
whole infrastructure around that mechanism that simplifies transition
between versions.
--
Alex
|  |