mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue@us.ibm.com>
To: James Morris <jmorris@namei.org>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>,
	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: Thu, 13 Mar 2008 08:18:18 -0500	[thread overview]
Message-ID: <20080313131818.GA9771@sergelap.austin.ibm.com> (raw)
In-Reply-To: <Xine.LNX.4.64.0803132022530.6358@us.intercode.com.au>

Quoting James Morris (jmorris@namei.org):
> On Wed, 12 Mar 2008, Serge E. Hallyn wrote:
> 
> > +#ifdef CONFIG_SECURITY
> > +static struct security_operations devcgroup_security_ops = {
> > +	.inode_mknod = 			devcgroup_inode_mknod,
> > +	.inode_permission = 		devcgroup_inode_permission,
> > +
> > +	.ptrace =			cap_ptrace,
> > +	.capget =			cap_capget,
> > +	.capset_check =			cap_capset_check,
> > +	.capset_set =			cap_capset_set,
> > +	.capable =			cap_capable,
> > +	.settime =			cap_settime,
> > +	.netlink_send =			cap_netlink_send,
> > +	.netlink_recv =			cap_netlink_recv,
> > +
> > +	.bprm_apply_creds =		cap_bprm_apply_creds,
> > +	.bprm_set_security =		cap_bprm_set_security,
> > +	.bprm_secureexec =		cap_bprm_secureexec,
> > +
> > +	.inode_setxattr =		cap_inode_setxattr,
> > +	.inode_removexattr =		cap_inode_removexattr,
> > +	.inode_need_killpriv =		cap_inode_need_killpriv,
> > +	.inode_killpriv =		cap_inode_killpriv,
> > +
> > +	.task_kill =			cap_task_kill,
> > +	.task_setscheduler =		cap_task_setscheduler,
> > +	.task_setioprio =		cap_task_setioprio,
> > +	.task_setnice =			cap_task_setnice,
> > +	.task_post_setuid =		cap_task_post_setuid,
> > +	.task_prctl =                   cap_task_prctl,
> > +	.task_reparent_to_init =	cap_task_reparent_to_init,
> > +
> > +	.syslog =                       cap_syslog,
> > +
> > +	.vm_enough_memory =             cap_vm_enough_memory,
> > +};
> 
> For lower overall complexity, why not just extend the capability LSM to 
> include the devcgroup_ perms if CONFIG_CGROUP_DEV ?

That does make for a simpler implementation at this point, however if
any other such LSMs come along (as Casey seemed to think they would) the
end result could end up being horrible spaghetti code of dependencies
and interrelated configs.

But OTOH we went years with no such changes, so that's probably not a
particularly practical concern unless someone can cite specific upcoming
examples.  So if noone objects I'll try that approach.

thanks,
-serge

  reply	other threads:[~2008-03-13 13: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 [this message]
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
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=20080313131818.GA9771@sergelap.austin.ibm.com \
    --to=serue@us.ibm.com \
    --cc=casey@schaufler-ca.com \
    --cc=greg@kroah.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=sds@epoch.ncsc.mil \
    --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®