Re: [PATCH] Security: Add __init to register_security to disable load a security module on runtime

From: Tetsuo Handa
Date: Sun Feb 28 2010 - 01:35:53 EST


Zhitong Wang wrote:
> Load a security module on runtime is not safe on SMP systems, LSM
> framework doesn't have any locks.

Unloading security module on runtime would be difficult. But loading security
module on runtime is not impossible. A security module can be loaded inside
initramfs if the security module provides appropriate lock.

When AppArmor get merged into mainline, do you want to bother distributors
about size of vmlinux when some wants to use SELinux, some wants to use Smack,
some wants to use TOMOYO, and some wants to use AppArmor. All of them have to
be built-in but only one of them can be enabled.

I think we should allow security modules to be loaded on runtime, if security
modules can provide appropriate lock for SMP-safe initialization.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/