From: "Paul Menage" <menage@google.com>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
linux-security-module@vger.kernel.org, "Greg KH" <greg@kroah.com>,
"Stephen Smalley" <sds@epoch.ncsc.mil>,
"Casey Schaufler" <casey@schaufler-ca.com>,
"Pavel Emelianov" <xemul@openvz.org>
Subject: Re: [RFC] cgroups: implement device whitelist lsm (v2)
Date: Fri, 14 Mar 2008 02:18:10 -0700 [thread overview]
Message-ID: <6599ad830803140218v3d9ca478ve41516a9ea627eb@mail.gmail.com> (raw)
In-Reply-To: <20080313032749.GA13258@sergelap.austin.ibm.com>
On Wed, Mar 12, 2008 at 8:27 PM, Serge E. Hallyn <serue@us.ibm.com> wrote:
> Implement a cgroup using the LSM interface to enforce mknod and open
> on device files.
>
> This implements a simple device access whitelist. A whitelist entry
> has 4 fields. 'type' is a (all), c (char), or b (block). 'all' means it
> applies to all types, all major numbers, and all minor numbers. Major and
> minor are obvious. Access is a composition of r (read), w (write), and
> m (mknod).
>
> The root devcgroup starts with rwm to 'all'. A child devcg gets a copy
> of the parent. Admins can then add and remove devices to the whitelist.
> Once CAP_HOST_ADMIN is introduced it will be needed to add entries as
> well or remove entries from another cgroup, though just CAP_SYS_ADMIN
> will suffice to remove entries for your own group.
>
> An entry is added by doing "echo <type> <maj> <min> <access>" > devcg.allow,
> for instance:
>
> echo b 7 0 mrw > /cgroups/1/devcg.allow
>
> An entry is removed by doing likewise into devcg.deny. Since this is a
> pure whitelist, not acls, you can only remove entries which exist in the
> whitelist. You must explicitly
>
> echo a 0 0 mrw > /cgroups/1/devcg.deny
>
> to remove the "allow all" entry which is automatically inherited from
> the root cgroup.
In keeping with the naming convention for control groups, "devices"
would be better than "devcg".
Paul
next prev parent reply other threads:[~2008-03-14 9:18 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-13 3:27 Serge E. Hallyn
2008-03-13 9:25 ` James Morris
2008-03-13 13:18 ` Serge E. Hallyn
2008-03-13 13:50 ` James Morris
2008-03-13 14:38 ` Serge E. Hallyn
2008-03-13 22:27 ` James Morris
2008-03-13 22:46 ` Serge E. Hallyn
2008-03-13 23:49 ` James Morris
2008-03-14 1:41 ` Serge E. Hallyn
2008-03-14 4:47 ` Greg KH
2008-03-14 13:54 ` Serge E. Hallyn
2008-03-14 13:58 ` Pavel Emelyanov
2008-03-14 15:45 ` Serge E. Hallyn
2008-03-14 15:54 ` Pavel Emelyanov
2008-03-14 16:57 ` Stephen Smalley
2008-03-14 9:28 ` Pavel Emelyanov
2008-03-14 13:58 ` Serge E. Hallyn
2008-03-14 14:05 ` Pavel Emelyanov
2008-03-14 14:37 ` Serge E. Hallyn
2008-03-14 15:07 ` Pavel Emelyanov
2008-03-14 14:12 ` Paul Menage
2008-03-14 14:42 ` Serge E. Hallyn
2008-03-16 0:59 ` Paul Menage
2008-03-14 2:51 ` Casey Schaufler
2008-03-14 9:16 ` Paul Menage
2008-03-14 14:05 ` Serge E. Hallyn
2008-03-14 14:15 ` Paul Menage
2008-03-14 14:35 ` Serge E. Hallyn
2008-03-16 0:57 ` Paul Menage
2008-03-14 9:18 ` Paul Menage [this message]
2008-03-14 14:00 ` Serge E. Hallyn
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=6599ad830803140218v3d9ca478ve41516a9ea627eb@mail.gmail.com \
--to=menage@google.com \
--cc=casey@schaufler-ca.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sds@epoch.ncsc.mil \
--cc=serue@us.ibm.com \
--cc=xemul@openvz.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
all inboxes | Powered by JetHome®