lkml.org 
[lkml]   [2010]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] Security: Add __init to register_security to disable load a security module on runtime
From
Load a security module on runtime is not safe on SMP systems,  LSM
framework doesn't have any locks.

On Sat, Feb 27, 2010 at 2:30 PM, Tetsuo Handa
<penguin-kernel@i-love.sakura.ne.jp> wrote:
> Zhitong Wang wrote:
>> LSM original intention is not allowed to load security modules on runtime, right?
>
> My understanding is that the reason register_security() became no longer
> exported to loadable kernel modules is the difficulty of cleanly
> initializing/finalizing security modules since security modules usually
> allocate/release memory on various structures. When that change happened
> (i.e. as of 2.6.24), SELinux was the only in-tree LSM user.
>
> Those security modules which needn't to allocate/release memory on various
> structures can be loaded on runtime, if register_security() is exported to
> loadable kernel modules.
>
> If a distribution user adds a loadable kernel module (which is not a security
> module) which distributor didn't select, the user can get distributor's support
> except problems caused by that module.
>
> However, due to limitation that security modules cannot be added as loadable
> kernel modules, when a distribution user wants to select security modules which
> distributor didn't select, distributor's support is no longer provided
> (i.e. not only problems caused by the security modules selected by the user
> but also problems caused by the rest of kernel and userland).
>
> What's the difference between a kernel module which uses LSM and a kernel
> module which does not use LSM? Any kernel modules can cause severe problems.
>
> My understanding is that LSM's original intention is to allow Linux users to
> select security modules. Why LSM places security modules under adverse condition?
>


\
 
 \ /
  Last update: 2010-02-28 06:59    [W:0.707 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site