linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: Tejun Heo <tj@kernel.org>, Ondrej Mosnacek <omosnace@redhat.com>
Cc: selinux@vger.kernel.org, Paul Moore <paul@paul-moore.com>,
	linux-security-module@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org,
	Jeffrey Vander Stoep <jeffv@google.com>,
	Daniel J Walsh <dwalsh@redhat.com>
Subject: Re: [PATCH 0/3] Allow initializing the kernfs node's secctx based on its parent
Date: Tue, 15 Jan 2019 09:36:44 -0500	[thread overview]
Message-ID: <fe933a61-78a4-081c-7da1-fd68b189481e@tycho.nsa.gov> (raw)
In-Reply-To: <20190111205053.GV2509588@devbig004.ftw2.facebook.com>

On 1/11/19 3:50 PM, Tejun Heo wrote:
> Hello,
> 
> On Wed, Jan 09, 2019 at 10:10:25AM +0100, Ondrej Mosnacek wrote:
>> The main motivation for this change is that the userspace users of cgroupfs
>> (which is built on kernfs) expect the usual security context inheritance
>> to work under SELinux (see [1] and [2]). This functionality is required for
>> better confinement of containers under SELinux.
> 
> Can you please go into details on what the expected use cases are like
> for cgroupfs?  It shows up as a filesystem but isn't a real one and
> has its own permission scheme for delegation and stuff.  If sysfs
> hasn't needed selinux support, I'm having a bit of difficulty seeing
> why cgroupfs would.

Just to clarify with respect to your last point about sysfs, sysfs 
selinux support was first introduced in commit ddd29ec6597125c830f7 
("sysfs: Add labeling support for sysfs") for use by libvirt, and this 
support was carried over into kernfs, and is extensively used 
particularly in Android for controlling access to sysfs files.  The 
patch set in this series is extending that support to enable inheritance 
of security labels set via setxattr from parent to child when 
appropriate, which has particularly been requested for cgroup but would 
also be useful for sysfs.

      parent reply	other threads:[~2019-01-15 14:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-09  9:10 [PATCH 0/3] Allow initializing the kernfs node's secctx based on its parent Ondrej Mosnacek
2019-01-09  9:10 ` [PATCH 1/3] LSM: Add new hook for generic node initialization Ondrej Mosnacek
2019-01-09 14:35   ` Stephen Smalley
2019-01-09 16:06     ` Ondrej Mosnacek
2019-01-09  9:10 ` [PATCH 2/3] selinux: Implement the object_init_security hook Ondrej Mosnacek
2019-01-09 14:40   ` Stephen Smalley
2019-01-11  1:58     ` Paul Moore
2019-01-09  9:10 ` [PATCH 3/3] kernfs: Initialize security of newly created nodes Ondrej Mosnacek
2019-01-09 15:44   ` Stephen Smalley
2019-01-11  2:08     ` Paul Moore
2019-01-11 20:50 ` [PATCH 0/3] Allow initializing the kernfs node's secctx based on its parent Tejun Heo
2019-01-14  9:14   ` Ondrej Mosnacek
2019-01-14  9:29     ` Ondrej Mosnacek
     [not found]       ` <64977013-e2a5-809d-7a3f-bffbda9276aa@redhat.com>
2019-01-17 16:15         ` Tejun Heo
2019-01-17 16:39           ` Stephen Smalley
2019-01-17 20:30             ` Daniel Walsh
2019-01-17 20:35           ` Daniel Walsh
2019-01-14 15:50     ` Tejun Heo
2019-01-15 14:36   ` Stephen Smalley [this message]

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=fe933a61-78a4-081c-7da1-fd68b189481e@tycho.nsa.gov \
    --to=sds@tycho.nsa.gov \
    --cc=cgroups@vger.kernel.org \
    --cc=dwalsh@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jeffv@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=omosnace@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=selinux@vger.kernel.org \
    --cc=tj@kernel.org \
    /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).