From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754173AbcJDQQf (ORCPT ); Tue, 4 Oct 2016 12:16:35 -0400 Received: from mail-yw0-f196.google.com ([209.85.161.196]:33681 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753332AbcJDQQd (ORCPT ); Tue, 4 Oct 2016 12:16:33 -0400 Date: Tue, 4 Oct 2016 12:16:30 -0400 From: Tejun Heo To: John Stultz Cc: lkml , Li Zefan , Jonathan Corbet , cgroups@vger.kernel.org, Android Kernel Team , Rom Lemarchand , Colin Cross , Dmitry Shmidt , Todd Kjos , Christian Poetzsch , Amit Pundir Subject: Re: [RFC][PATCH 0/2] Another pass at Android style loosening of cgroup attach permissions Message-ID: <20161004161630.GC4205@htj.duckdns.org> References: <1475556090-6278-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1475556090-6278-1-git-send-email-john.stultz@linaro.org> User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, John. 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. 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. Thanks. -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [RFC][PATCH 0/2] Another pass at Android style loosening of cgroup attach permissions Date: Tue, 4 Oct 2016 12:16:30 -0400 Message-ID: <20161004161630.GC4205@htj.duckdns.org> References: <1475556090-6278-1-git-send-email-john.stultz@linaro.org> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ezfVzU+AoOwLCSvv7JHexZi1qL5OmRa4ptha+SeQSnM=; b=hlh84P9583ZPF+cwtbuFxK3I7jItOWLFwYlL3ULHGaLwkC0WXtL8+pPHYRuPgq/I9Y aTNYoiEWz2ZbhwFcl/dxGwOFdqiRzA3Hbh9lwXVgKAROB2OT+ey3IB353tF+oiRcuDr0 pKirPc1sSVe4VPPpScExAV40XHnO0zpumuDi17G8BfCzWvo0BvCBGZ6JPjgFiaw2+eoX Fa+RsqGYmaThyz9En+W32rPsDpGHehIKUP/ruRvyUDlJNr+Ig+dzsX1by0VqHMuB8D94 uP4LGFItBaxzeXr+mMzuQZaf8Z7pbapT7efw954VXcmt9PK+FpuSlUIselOxpgwYd/Zx 1+lA== Content-Disposition: inline In-Reply-To: <1475556090-6278-1-git-send-email-john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: John Stultz Cc: lkml , Li Zefan , Jonathan Corbet , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Android Kernel Team , Rom Lemarchand , Colin Cross , Dmitry Shmidt , Todd Kjos , Christian Poetzsch , Amit Pundir Hello, John. 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. 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. Thanks. -- tejun