All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Aristeu Rozanski <aris-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	Lennart Poettering
	<lennart-mdGvqq1h2p+GdvJs77BJ7Q@public.gmane.org>,
	Kay Sievers <kay-tD+1rO4QERM@public.gmane.org>,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [OFFLIST] status of devcg
Date: Thu, 11 Jul 2013 10:34:05 +0100	[thread overview]
Message-ID: <20130711093405.GC2377@redhat.com> (raw)
In-Reply-To: <20130710195001.GW14011-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On Wed, Jul 10, 2013 at 03:50:02PM -0400, Aristeu Rozanski wrote:
> On Wed, Jul 10, 2013 at 11:46:55AM -0700, Tejun Heo wrote:
> > Just wondering whether you're working on implementing new hierarchical
> > behavior on devcg.  If so, can you please share some details on how
> > you're planning to do it?  Please feel free to add the relevant
> > mailing lists when replying.
> 
> I did start, but still dealing with lots of company internal tasks so I
> couldn't do much.
> 
> One of the ideas is to start changing (again) how the rules are processed
> internally, moving away from the default policy + exceptions model to
> an ordered set of rules like iptables:
> 
> 	default: allow/deny
> 	allow block major 100-101, all minors
> 	deny char major 200, all minors
> 	...
> 
> That will solve most complex use cases the current model won't [1] but
> the problem with this approach is that since it relies on order, merging
> would be a problem, and it'd have test each parent all the way to / to
> make sure the access is possible.
> 
> [1] One example of usage the current model won't solve:
> 
> 	- by default deny everything
> 	- allow c,200,*
> 	- but deny c,200,100
> 
> The second idea, which is simpler, will reuse the current internal model
> of default policy + exceptions and the idea in the initial patches of having
> two lists in each cgroup: active policy+exceptions and locally set
> policy+exceptions. This way for every change that happens in a parent (or
> even change of parents when moving the cgroup around), the active
> policy+exceptions will be regenerated.
> 
> In both cases, we do need a new userspace interface (although we can
> still provide backwards compatibility with the old one).
> 
> Comments?

FWIW, libvirt's usage of devcg is to deny all by default, allow major 136
(for all /dev/pts/*), followed by allow (major,minor) pair for each specific
whitelisted devices. As such we don't have anything that relies on ordering
of rules in devcg.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  parent reply	other threads:[~2013-07-11  9:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20130710184655.GB16979@mtj.dyndns.org>
     [not found] ` <20130710184655.GB16979-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-07-10 19:50   ` [OFFLIST] status of devcg Aristeu Rozanski
     [not found]     ` <20130710195001.GW14011-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-07-11  9:34       ` Daniel P. Berrange [this message]
     [not found]         ` <20130711093405.GC2377-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-07-11 15:51           ` Tejun Heo
     [not found]             ` <20130711155106.GB9229-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-07-11 16:05               ` Serge Hallyn
2013-07-11 17:10                 ` Tejun Heo
     [not found]                   ` <20130711171037.GB10195-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-07-11 17:11                     ` Tejun Heo
2013-07-11 17:11                     ` Tejun Heo
2013-07-11 19:12                     ` Serge Hallyn
2013-07-11 19:12                     ` Serge Hallyn
2013-07-11 20:38                       ` Tejun Heo
     [not found]                         ` <20130711203833.GA3974-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2013-07-12 13:04                           ` Serge E. Hallyn
2013-07-11  9:34       ` Daniel P. Berrange

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=20130711093405.GC2377@redhat.com \
    --to=berrange-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=aris-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=kay-tD+1rO4QERM@public.gmane.org \
    --cc=lennart-mdGvqq1h2p+GdvJs77BJ7Q@public.gmane.org \
    --cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.