Re: [PATCH 2/2] cgroup: Add a allow_attach policy for Android

2016-10-06 Thread Dmitry Torokhov
On Thu, Oct 06, 2016 at 03:43:51PM -0700, Dmitry Torokhov wrote: > On Wed, Oct 05, 2016 at 12:18:17PM -0700, John Stultz wrote: > > On Wed, Oct 5, 2016 at 12:10 PM, Dmitry Torokhov > > wrote: > > > On Mon, Oct 03, 2016 at 09:41:30PM -0700, John Stultz wrote: > > >>

Re: [PATCH 2/2] cgroup: Add a allow_attach policy for Android

2016-10-06 Thread Dmitry Torokhov
On Thu, Oct 06, 2016 at 03:43:51PM -0700, Dmitry Torokhov wrote: > On Wed, Oct 05, 2016 at 12:18:17PM -0700, John Stultz wrote: > > On Wed, Oct 5, 2016 at 12:10 PM, Dmitry Torokhov > > wrote: > > > On Mon, Oct 03, 2016 at 09:41:30PM -0700, John Stultz wrote: > > >> +#ifdef

Re: [PATCH 2/2] cgroup: Add a allow_attach policy for Android

2016-10-06 Thread Dmitry Torokhov
On Wed, Oct 05, 2016 at 12:18:17PM -0700, John Stultz wrote: > On Wed, Oct 5, 2016 at 12:10 PM, Dmitry Torokhov > wrote: > > On Mon, Oct 03, 2016 at 09:41:30PM -0700, John Stultz wrote: > >> +#ifdef CONFIG_CGROUP_NICE_ATTACH > >> +int cgroup_nice_allow_attach(struct

Re: [PATCH 2/2] cgroup: Add a allow_attach policy for Android

2016-10-06 Thread Dmitry Torokhov
On Wed, Oct 05, 2016 at 12:18:17PM -0700, John Stultz wrote: > On Wed, Oct 5, 2016 at 12:10 PM, Dmitry Torokhov > wrote: > > On Mon, Oct 03, 2016 at 09:41:30PM -0700, John Stultz wrote: > >> +#ifdef CONFIG_CGROUP_NICE_ATTACH > >> +int cgroup_nice_allow_attach(struct cgroup_taskset *tset) > >> +{

Re: [PATCH 2/2] cgroup: Add a allow_attach policy for Android

2016-10-05 Thread John Stultz
On Wed, Oct 5, 2016 at 12:10 PM, Dmitry Torokhov wrote: > On Mon, Oct 03, 2016 at 09:41:30PM -0700, John Stultz wrote: >> +#ifdef CONFIG_CGROUP_NICE_ATTACH >> +int cgroup_nice_allow_attach(struct cgroup_taskset *tset) >> +{ >> + const struct cred *cred =

Re: [PATCH 2/2] cgroup: Add a allow_attach policy for Android

2016-10-05 Thread John Stultz
On Wed, Oct 5, 2016 at 12:10 PM, Dmitry Torokhov wrote: > On Mon, Oct 03, 2016 at 09:41:30PM -0700, John Stultz wrote: >> +#ifdef CONFIG_CGROUP_NICE_ATTACH >> +int cgroup_nice_allow_attach(struct cgroup_taskset *tset) >> +{ >> + const struct cred *cred = current_cred(), *tcred; >> +

Re: [PATCH 2/2] cgroup: Add a allow_attach policy for Android

2016-10-05 Thread Dmitry Torokhov
On Mon, Oct 03, 2016 at 09:41:30PM -0700, John Stultz wrote: > +#ifdef CONFIG_CGROUP_NICE_ATTACH > +int cgroup_nice_allow_attach(struct cgroup_taskset *tset) > +{ > + const struct cred *cred = current_cred(), *tcred; > + struct task_struct *task; > + struct cgroup_subsys_state *css; >

Re: [PATCH 2/2] cgroup: Add a allow_attach policy for Android

2016-10-05 Thread Dmitry Torokhov
On Mon, Oct 03, 2016 at 09:41:30PM -0700, John Stultz wrote: > +#ifdef CONFIG_CGROUP_NICE_ATTACH > +int cgroup_nice_allow_attach(struct cgroup_taskset *tset) > +{ > + const struct cred *cred = current_cred(), *tcred; > + struct task_struct *task; > + struct cgroup_subsys_state *css; >

[PATCH 2/2] cgroup: Add a allow_attach policy for Android

2016-10-03 Thread John Stultz
From: Rom Lemarchand If CONFIG_CGROUP_NICE_ATTACH is enabled, this implements an allow_attach policy for Android, which allows any process with CAP_SYS_NICE to move tasks across cpuset and cpuctrl cgroups. This includes folded down fixes from: Dmitry Shmidt

[PATCH 2/2] cgroup: Add a allow_attach policy for Android

2016-10-03 Thread John Stultz
From: Rom Lemarchand If CONFIG_CGROUP_NICE_ATTACH is enabled, this implements an allow_attach policy for Android, which allows any process with CAP_SYS_NICE to move tasks across cpuset and cpuctrl cgroups. This includes folded down fixes from: Dmitry Shmidt Riley Andrews Amit Pundir