From: Stephen Smalley <sds@tycho.nsa.gov>
To: Sebastien Buisson <sbuisson.ddn@gmail.com>,
Paul Moore <pmoore@redhat.com>
Cc: linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov,
william.c.roberts@intel.com, serge@hallyn.com,
james.l.morris@oracle.com, Eric Paris <eparis@parisplace.org>,
Paul Moore <paul@paul-moore.com>,
Sebastien Buisson <sbuisson@ddn.com>
Subject: Re: [PATCH] selinux: add selinux_is_enforced() function
Date: Wed, 12 Apr 2017 09:58:39 -0400 [thread overview]
Message-ID: <1492005519.3881.8.camel@tycho.nsa.gov> (raw)
In-Reply-To: <CAPkE-bUsY8qD5xHU4VD-dxtAGxCGUhuQQmcS4kN0FyAozPRzhw@mail.gmail.com>
On Wed, 2017-04-12 at 15:30 +0200, Sebastien Buisson wrote:
> 2017-04-12 13:55 GMT+02:00 Paul Moore <pmoore@redhat.com>:
> > As currently written this code isn't something we would want to
> > merge
> > upstream for two important reasons:
> >
> > * No abstraction layer at the LSM interface. The core kernel code
> > should not call directly into any specific LSM, all interaction
> > should
> > go through the LSM hooks.
>
> The idea behind this patch and the other one was to replicate what is
> done with selinux_is_enabled(). As I understand it now,
> selinux_is_enabled() should remain the only exception to the LSM
> hooks.
> So do you agree if I propose a new security_is_enforced() function at
> the LSM abstraction layer, which will be hooked to a
> selinux_is_enforced() function defined inside the SELinux LSM?
Even your usage of selinux_is_enabled() looks suspect; that should
probably go away. Only other user of it seems to be some cred validity
checking that could be dropped as well. The include/linux/selinux.h
interfaces were originally for use by audit and secmark when there were
no other LSMs and have gradually been removed.
next prev parent reply other threads:[~2017-04-12 13:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-12 9:06 [PATCH] selinux: add selinux_is_enforced() function Sebastien Buisson
2017-04-12 11:55 ` Paul Moore
2017-04-12 13:30 ` Sebastien Buisson
2017-04-12 13:58 ` Stephen Smalley [this message]
2017-04-12 15:19 ` Sebastien Buisson
2017-04-12 16:33 ` Stephen Smalley
2017-04-13 0:12 ` Casey Schaufler
2017-04-12 13:30 ` Sebastien Buisson
2017-04-12 14:35 ` Stephen Smalley
2017-04-12 15:11 ` Sebastien Buisson
2017-04-12 16:24 ` Stephen Smalley
2017-04-12 17:07 ` Sebastien Buisson
2017-04-12 17:24 ` Stephen Smalley
2017-04-12 12:13 ` Stephen Smalley
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=1492005519.3881.8.camel@tycho.nsa.gov \
--to=sds@tycho.nsa.gov \
--cc=eparis@parisplace.org \
--cc=james.l.morris@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=pmoore@redhat.com \
--cc=sbuisson.ddn@gmail.com \
--cc=sbuisson@ddn.com \
--cc=selinux@tycho.nsa.gov \
--cc=serge@hallyn.com \
--cc=william.c.roberts@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).