Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1633369

Re: [PATCH v1] LSM: Enable multiple calls to security_add_hooks() for the same LSM

Path csiph.com!weretis.net!feeder4.news.weretis.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Newsgroups linux.kernel
Subject Re: [PATCH v1] LSM: Enable multiple calls to security_add_hooks() for the same LSM
Date Sun, 30 Apr 2017 04:20:02 +0200
Message-ID <tBMCS-5MB-3@gated-at.bofh.it> (permalink)
References <tBFUK-1Hb-7@gated-at.bofh.it> <tBGQO-2fF-21@gated-at.bofh.it>
X-Virus-Status clean(F-Secure/fsigk_smtp/530/fsav304.sakura.ne.jp)
X-Mailer Winbiff [Version 2.51 PL2]
X-Accept-Language ja,en,zh
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 24
Organization linux.* mail to news gateway
X-Original-Cc james.l.morris@oracle.com, keescook@chromium.org, serge@hallyn.com, linux-security-module@vger.kernel.org
X-Original-Date Sun, 30 Apr 2017 11:11:41 +0900
X-Original-Message-ID <201704301111.CFC52113.LFVFQJtFOOMHOS@I-love.SAKURA.ne.jp>
X-Original-References <20170429190257.27137-1-mic@digikod.net> <da65a5ff-62a3-f755-1e8c-bf91a03fd1c9@schaufler-ca.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1633369

Show key headers only | View raw


Casey Schaufler wrote:
> On 4/29/2017 12:02 PM, Mickael Salaun wrote:
> > Check if the registering LSM already registered hooks just before. This
> > enable to split hook declarations into multiple files without
> > registering multiple time the same LSM name, starting from commit
> > d69dece5f5b6 ("LSM: Add /sys/kernel/security/lsm").
> 
> What's special about the previous registration? Keep it
> simple and check it the name is already anywhere on the
> list and only add it if it's not already there. I don't
> see advantage to:
> 
> 	% cat /sys/kernel/security/lsm
> 	capability,yama,spiffy,selinux,spiffy
> 
> over
> 	% cat /sys/kernel/security/lsm
> 	capability,yama,spiffy,selinux
> 

-	if (lsm_append(lsm, &lsm_names) < 0)
+	if (lsm && lsm_append(lsm, &lsm_names) < 0)

in security_add_hooks()?

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v1] LSM: Enable multiple calls to security_add_hooks() for the same LSM Mickaël Salaün <mic@digikod.net> - 2017-04-29 21:10 +0200
  Re: [PATCH v1] LSM: Enable multiple calls to security_add_hooks() for  the same LSM Casey Schaufler <casey@schaufler-ca.com> - 2017-04-29 22:10 +0200
    Re: [PATCH v1] LSM: Enable multiple calls to security_add_hooks() for the same LSM Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-04-30 04:20 +0200
      Re: [PATCH v1] LSM: Enable multiple calls to security_add_hooks() for  the same LSM Mickaël Salaün <mic@digikod.net> - 2017-04-30 11:40 +0200
  Re: [PATCH v1] LSM: Enable multiple calls to security_add_hooks()  for the same LSM James Morris <jmorris@namei.org> - 2017-05-01 01:30 +0200
    Re: [PATCH v1] LSM: Enable multiple calls to security_add_hooks() for  the same LSM Mickaël Salaün <mic@digikod.net> - 2017-05-08 21:30 +0200
      Re: [PATCH v1] LSM: Enable multiple calls to security_add_hooks() for  the same LSM Casey Schaufler <casey@schaufler-ca.com> - 2017-05-08 22:10 +0200
        Re: [PATCH v1] LSM: Enable multiple calls to security_add_hooks() for  the same LSM Mickaël Salaün <mic@digikod.net> - 2017-05-08 22:20 +0200

csiph-web