On Sat, 29 Sep 2001, Russell Coker wrote:
> I agree that keeping the LSM kernel patch separate is a good idea. I have
> just discovered that the LSM patch on the site is not the upstream 2001_09_26
> version, but the previous version plus some CVS patches. I think that it
> would be beneficial to have an original upstream release of LSM with an
> additional patch. Currently there is an LSM patch on the NSA site with a
> version number implying (to me at least) that it is the same as the current
> LSM upstream release.
A few points of clarification about the relationship between the LSM kernel patch on the NSA web site and the one at lsm.immunix.org:
> Now for the kernel patch for selinux I was not requesting that it be merged
> into a single patch with the LSM code (that's the last thing I want). What I
> would like is a single unified diff containing all the selinux kernel code
> without any LSM code. So the proceedure should be:
> Extract upstream kernel source.
> Apply upstream LSM patch.
> Apply SE Linux LSM add-on patch for CVS LSM code.
> Apply SE Linux kernel patch.
> Compile.
> Yes, I can write a script that runs that script on a directory containing the
> security sub-directory from the LSM patch and then generates a unified diff
> containing the minor patch to the LSM security sub-directory and the
> security_plugin sub-dir. But it's painful, nasty, more error prone than
> other methods of achieving the same result, and it makes things more
> difficult for anyone who wants to audit my work (much easier if they can just
> see me using files from the NSA site and move on to the next item in the
> check list).
So, you want a new download option that consists of:
1) A "pure" LSM kernel patch relative to some snapshot from lsm.immunix.org,
2) A SELinux kernel patch that modifies the LSM security/{Makefile,
Config.in} and that drops the SELinux kernel module into
security/selinux_plug, and
3) A SELinux archive that contains everything except the module
subdirectory, plus an alternate README for this situation?
I doubt that any of our direct users would want this download option, but I suppose it is a possibility for redistributors.
> Another issue is that the kernel module doesn't get generated in the same way
> as other modules. I've got 246 regular kernel modules in my kernel build and
> an SE Linux module that has to be compiled differently. I think it would
> really make sense to have the same y/n/m question as for other modules.
We only recommend building SELinux as part of the kernel. Keep in mind that SELinux was originally designed and implemented as a direct kernel patch. Although we have adapted SELinux to work as a kernel module using the LSM security hooks, dynamically loading it as a module into a running kernel poses some thorny problems that are not fully resolved.
Although we only recommend building as part of the kernel, the patch to the security/Config.in file for SELinux does provide the same 'y/n/m' question as other modules. But we also provide instructions and Makefiles for building it as a module without needing to patch LSM or the kernel, since someone may wish to build it for an existing LSM kernel, particularly if LSM becomes integrated into the mainstream kernel. However, we don't currently recommend or support SELinux as a dynamically loaded module into a running kernel.
> However there is the option to compile the module into the kernel, in which
> case it is not a regular kernel and will not successfully boot a system
> without the rest of the SE code installed.
Actually, the SELinux modified daemons and utilities test for the presence of the SELinux module (via the new system calls it implements) and fall back to their ordinary behavior if SELinux is not present. So you can still boot an ordinary Linux kernel with the rest of the SELinux code.
Personally, I don't care whether we change EXTRAVERSION or not. I'll have to see what my colleagues at the NSA think.
-- Stephen D. Smalley, NAI Labs ssmalley@nai.com -- You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message.Received on Mon 1 Oct 2001 - 09:50:46 EDT
This archive was generated by hypermail 2.2.0 on Wed 11 Jun 2008 - 08:10:26 EDT