[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080819125710.GA18972@redhat.com>
Date: Tue, 19 Aug 2008 08:57:10 -0400
From: Vivek Goyal <vgoyal@...hat.com>
To: Paul Menage <menage@...gle.com>
Cc: righi.andrea@...il.com,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Balbir Singh <balbir@...ux.vnet.ibm.com>,
linux kernel mailing list <linux-kernel@...r.kernel.org>,
Dhaval Giani <dhaval@...ux.vnet.ibm.com>,
Kazunaga Ikeno <k-ikeno@...jp.nec.com>,
Morton Andrew Morton <akpm@...ux-foundation.org>,
Thomas Graf <tgraf@...hat.com>,
Ulrich Drepper <drepper@...hat.com>
Subject: Re: [RFC] [PATCH -mm] cgroup: uid-based rules to add processes
efficiently in the right cgroup
On Mon, Aug 18, 2008 at 02:05:36PM -0700, Paul Menage wrote:
> On Sun, Aug 17, 2008 at 3:33 AM, Andrea Righi <righi.andrea@...il.com> wrote:
> >
> > [ I wrote this patch for a "special purpose" environment, where a lot of
> > short-lived processes belonging to different users are spawned by
> > different daemons,
>
> What kinds of daemons are these? Is it not possible to add some
> libcgroup calls to these daemons?
>
> I'm reluctant to add features like this to the kernel side of cgroups
> due to their "magical" nature - any task that does a setuid() now
> risks being swept off into a different cgroup.
>
> Having the cgroup attachment done explicitly e.g. by a PAM library at
> login time is much less likely to cause unexpected behaviour.
>
> Maybe if we had a way to control which tasks the magical setuid
> switching occurs for, it might be more acceptable. (Perhaps base it on
> the cgroup of the task that's doing the setuid as well?
Hi Paul,
Same thing will happen if we implement the daemon in user space. A task
who does seteuid(), can be swept away to a different cgroup based on
rules specified in /etc/cgrules.conf.
What do you mean by risk? This is the policy set up by system admin and
behaviour would seem consistent as per the policy. If an admin decides
that tasks of user "apache" should run into /container/cpu/apache cgroup and
if a "root" tasks does seteuid(apache), then it manes sense to move task
to /container/cpu/apache.
Exactly what kind of scenario do you have in mind when you want the policy
to be enforced selectively based on task (tid)?
Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists