Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Oct 1997 07:28:50 -0500 (EST)
From:      Alfred Perlstein <perlsta@cs.sunyit.edu>
To:        Niall Smart <njs3@doc.ic.ac.uk>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Loading code from userland
Message-ID:  <Pine.BSF.3.96.971028072620.2814C-100000@server.local.sunyit.edu>
In-Reply-To: <E0xQ8rs-00007f-00@oak67.doc.ic.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
this seems like a bad idea, you would have arbitrary user code being
executed at a privledged level, it's better to make seperate lkms for each
method.

you might be able to set something up alongs the lines that the kernel
calls a procedure in your program to do something, however no rights
should be given to the user code that could compromise the system.

> Hi,
> 
> I was wondering how I can load code from user-land into the kernel in
> a manner similar to dlopen() and dlsym()?  For example, if I had an
> encrypted file system then I might want to allow the user to load their
> own encryption module which defined a set of operations such as
> initialise(), encrypt_block(), decrypt_block() etc.
> 
> I think this can be achieved using lkm's - is this correct?  I was
> thinking that the module would call a function in the main body of the
> encrypted file system code to pass it an array of entry points into
> the module.
> 
> Finally, can lkm's be compiled completely separately from the kernel or
> are they specific to a particular kernel configuration?
> 
> 
> Many thanks,
> 
> 
> 
> Niall Smart
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971028072620.2814C-100000>