lkml.org 
[lkml]   [2008]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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


\
 
 \ /
  Last update: 2008-05-25 08:21    [W:0.056 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site