Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Oct 1997 19:15:02 +0000
From:      njs3@doc.ic.ac.uk (Niall Smart)
To:        Terry Lambert <tlambert@primenet.com>, njs3@doc.ic.ac.uk (Niall Smart)
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Loading code from userland
Message-ID:  <E0xQH6U-00038C-00@oak67.doc.ic.ac.uk>
In-Reply-To: Terry Lambert <tlambert@primenet.com> "Re: Loading code from userland" (Oct 28,  5:57pm)

next in thread | previous in thread | raw e-mail | index | archive | help
On Oct 28,  5:57pm, Terry Lambert wrote:
} Subject: Re: Loading code from userland
> > 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.
> 
> You should procedurally abstract the interface so that the user
> code is run in user space, not kernel space, unless you believe
> you can trust all your users to not rewrite the "uid" portion
> of their own proc struct.

[ big snip ]

After re-reading my original post, it's clear that I was ambiguous
about what I was trying to do.  When I said 'user' I should have said
'the system administrator': the encryption would be done on a filesystem
basis rather file by file, user by user.  My apologies and thanks to those
who replied with ideas of how to safely implement user-configuration of
the kernel.

So, I'm trying to allow the system administrator to load a module which
can operate on the blocks before they get written to disk.  This could
be used for compression or encryption.  The question is how can I load
a module like this and register it with the filesystem implementation.
Loadable kernel modules?


Regards,

Niall



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E0xQH6U-00038C-00>