Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1495545
| From | John Stultz <john.stultz@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC][PATCH 0/2] Another pass at Android style loosening of cgroup attach permissions |
| Date | 2016-10-04 20:10 +0200 |
| Message-ID | <soCk9-6dM-11@gated-at.bofh.it> (permalink) |
| References | <sopPX-648-1@gated-at.bofh.it> <soABH-57P-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Oct 4, 2016 at 9:16 AM, Tejun Heo <tj@kernel.org> wrote: > On Mon, Oct 03, 2016 at 09:41:28PM -0700, John Stultz wrote: >> The migration of a task from the foreground to background, or to >> elevate a task to audio priority, may be done by system service that >> does not run as root. So this patch allows processes with CAP_SYS_NICE >> to be able to migrate tasks between cgroups. I suspect if there was a >> specific cap (CAP_SYS_CHANGE_CGROUP) for this, it would be usable here, >> but in its absence, they've overloaded CAP_SYS_NICE for this use. > > CAP_SYS_RESOURCE won't do? > >> At first glance, overloading CAP_SYS_NICE seems a bit hackish, but this >> shows that there is a active and widely deployed use for different cgroup >> attachment rules then what is currently available. > > I'm curious who issues these migrations. The system_server process via the sched_policy logic: http://androidxref.com/7.0.0_r1/xref/system/core/libcutils/sched_policy.c#274 See set_cpuset_policy() and set_sched_policy(). > Is that restricted to > certain uids? If so, would it work for android if cgroupfs supports > ACL so that those uids can be approved via setfacl? That'd be an a > lot more generic approach. So tasks might move themselves in some cases to specific groups, but mostly its controlled by the system_server. So to make sure I understand your suggestion, you're suggesting the cgroupfs files like: cpuctrl/tasks, cpuctrl/bg_non_interactive/tasks, cpuset/foreground/tasks, cpuset/background/tasks, etc use ACL permissions to specify the specific uids that can write to them? I guess this would be conceptually similar to just setting the owner to the system task, no? Though I'm not sure that would be sufficient since it would still fail the cgroup_procs_write_permission() checks. Or are you suggesting we add extra logic to make the file owner uid as sufficient to change other tasks? thanks -john
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC][PATCH 0/2] Another pass at Android style loosening of cgroup attach permissions John Stultz <john.stultz@linaro.org> - 2016-10-04 06:50 +0200
[PATCH 2/2] cgroup: Add a allow_attach policy for Android John Stultz <john.stultz@linaro.org> - 2016-10-04 06:50 +0200
Re: [PATCH 2/2] cgroup: Add a allow_attach policy for Android John Stultz <john.stultz@linaro.org> - 2016-10-05 21:20 +0200
Re: [PATCH 2/2] cgroup: Add a allow_attach policy for Android Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-10-07 00:50 +0200
Re: [PATCH 2/2] cgroup: Add a allow_attach policy for Android Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-10-07 01:00 +0200
Re: [PATCH 2/2] cgroup: Add a allow_attach policy for Android Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-10-05 21:20 +0200
[PATCH 1/2] cgroup: Add generic cgroup subsystem permission checks John Stultz <john.stultz@linaro.org> - 2016-10-04 06:50 +0200
Re: [PATCH 1/2] cgroup: Add generic cgroup subsystem permission checks Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-10-05 21:10 +0200
Re: [PATCH 1/2] cgroup: Add generic cgroup subsystem permission checks John Stultz <john.stultz@linaro.org> - 2016-10-05 21:20 +0200
Re: [PATCH 1/2] cgroup: Add generic cgroup subsystem permission checks Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-10-05 21:30 +0200
Re: [RFC][PATCH 0/2] Another pass at Android style loosening of cgroup attach permissions Tejun Heo <tj@kernel.org> - 2016-10-04 18:20 +0200
Re: [RFC][PATCH 0/2] Another pass at Android style loosening of cgroup attach permissions John Stultz <john.stultz@linaro.org> - 2016-10-04 20:10 +0200
Re: [RFC][PATCH 0/2] Another pass at Android style loosening of cgroup attach permissions John Stultz <john.stultz@linaro.org> - 2016-10-04 20:10 +0200
Re: [RFC][PATCH 0/2] Another pass at Android style loosening of cgroup attach permissions Tejun Heo <tj@kernel.org> - 2016-10-04 21:40 +0200
Re: [RFC][PATCH 0/2] Another pass at Android style loosening of cgroup attach permissions Tejun Heo <tj@kernel.org> - 2016-10-04 21:50 +0200
Re: [RFC][PATCH 0/2] Another pass at Android style loosening of cgroup attach permissions John Stultz <john.stultz@linaro.org> - 2016-10-04 21:50 +0200
Re: [RFC][PATCH 0/2] Another pass at Android style loosening of cgroup attach permissions "Serge E. Hallyn" <serge@hallyn.com> - 2016-10-04 22:20 +0200
Re: [RFC][PATCH 0/2] Another pass at Android style loosening of cgroup attach permissions Tejun Heo <tj@kernel.org> - 2016-10-04 22:40 +0200
Re: [RFC][PATCH 0/2] Another pass at Android style loosening of cgroup attach permissions "Serge E. Hallyn" <serge@hallyn.com> - 2016-10-04 23:30 +0200
Re: [RFC][PATCH 0/2] Another pass at Android style loosening of cgroup attach permissions Tejun Heo <tj@kernel.org> - 2016-10-04 23:40 +0200
csiph-web