mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: wzt wzt <wzt.wzt@gmail.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org, sds@tycho.nsa.gov,
	jmorris@namei.org
Subject: Re: [PATCH] Security: Add __init to register_security to disable load  a security module on runtime
Date: Sun, 28 Feb 2010 13:56:37 +0800	[thread overview]
Message-ID: <628d1651002272156ld6cb7cdmee34117ccf103285@mail.gmail.com> (raw)
In-Reply-To: <201002271530.JCB31845.FOLJMFVFOHtQSO@I-love.SAKURA.ne.jp>

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?
>

  reply	other threads:[~2010-02-28  5:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26 14:49 wzt.wzt
2010-02-27  1:52 ` Tetsuo Handa
2010-02-27  3:02   ` wzt wzt
2010-02-27  6:30     ` Tetsuo Handa
2010-02-28  5:56       ` wzt wzt [this message]
2010-02-28  6:35         ` Tetsuo Handa
2010-03-02 22:17 ` James Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=628d1651002272156ld6cb7cdmee34117ccf103285@mail.gmail.com \
    --to=wzt.wzt@gmail.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=sds@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®