From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH v1 3/3] cgroup: relax common ancestor restriction for direct descendants Date: Wed, 20 Jul 2016 11:51:47 -0400 Message-ID: <20160720155147.GG4574@htj.duckdns.org> References: <20160718161816.13040-1-asarai@suse.de> <20160718161816.13040-4-asarai@suse.de> 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=/eDcMA2cq4TuXRjGcbnWhY1M8C7zfAI9cPgjU0B7bzA=; b=GCz8xT2+AeKilK7aPKEo+Cp0lEGDfasCg+I3XCqbJkSiTTqMHrtM5fuTn3Dc6W+R86 Zx7pgOucaYO5cRZiO8Bv51etRfe+v1sutB/1n6FEfaXtw+S/MDCi2C4hrmky0UumDaUu Cb3LpH7qQPWp1EBeydFg5h9zppEYfwgLUeay+Wiy08kmAewFTLnptZet122B1jxOTO/2 kLxmpOxYhQFX5WujufEEpKj9ltttQ6Rt3sCP+CMTnlVtXPvzbzKzm2mV2jCpQq26OXjZ NS/cWHZP3IMO0lyj7dXzzEU7p4m4rTO1ounRhKanUaXx5xU1zi//YLvPHUjmmIKmvhg0 jiqA== Content-Disposition: inline In-Reply-To: <20160718161816.13040-4-asarai-l3A5Bk7waGM@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Aleksa Sarai Cc: Greg Kroah-Hartman , Li Zefan , Johannes Weiner , "Serge E. Hallyn" , Aditya Kali , Chris Wilson , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Christian Brauner , dev-IGmTWi+3HBZvNhPySn5qfx2eb7JE58TQ@public.gmane.org Hello, Aleksa. On Tue, Jul 19, 2016 at 02:18:16AM +1000, Aleksa Sarai wrote: > If we're moving from a parent to a direct descendant, the only end > result (on cgroupv2 hierarchies) is that the process experiences more > restrictive resource limits. Thus, there's no reason to restrict > processes from moving to direct descendants based on whether or not they > have cgroup.procs write access to their current cgroup. > > This is important for unprivileged subtree management, as it allows > unprivileged processes to move to their newly create subtrees. I don't think we can do this as this allows a sub-cgroup to steal an ancestor's process whether the ancestor likes it or not. A process being put in a context where it's more restricted without whatever is managing that part of cgroup hierarchy is not ok, at all. Please also note that nobody expects its processes to be stolen underneath it. This would be a management nightmare. Thanks. -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755117AbcGTPv6 (ORCPT ); Wed, 20 Jul 2016 11:51:58 -0400 Received: from mail-yw0-f169.google.com ([209.85.161.169]:35928 "EHLO mail-yw0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754955AbcGTPvt (ORCPT ); Wed, 20 Jul 2016 11:51:49 -0400 Date: Wed, 20 Jul 2016 11:51:47 -0400 From: Tejun Heo To: Aleksa Sarai Cc: Greg Kroah-Hartman , Li Zefan , Johannes Weiner , "Serge E. Hallyn" , Aditya Kali , Chris Wilson , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Christian Brauner , dev@opencontainers.org Subject: Re: [PATCH v1 3/3] cgroup: relax common ancestor restriction for direct descendants Message-ID: <20160720155147.GG4574@htj.duckdns.org> References: <20160718161816.13040-1-asarai@suse.de> <20160718161816.13040-4-asarai@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160718161816.13040-4-asarai@suse.de> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Aleksa. On Tue, Jul 19, 2016 at 02:18:16AM +1000, Aleksa Sarai wrote: > If we're moving from a parent to a direct descendant, the only end > result (on cgroupv2 hierarchies) is that the process experiences more > restrictive resource limits. Thus, there's no reason to restrict > processes from moving to direct descendants based on whether or not they > have cgroup.procs write access to their current cgroup. > > This is important for unprivileged subtree management, as it allows > unprivileged processes to move to their newly create subtrees. I don't think we can do this as this allows a sub-cgroup to steal an ancestor's process whether the ancestor likes it or not. A process being put in a context where it's more restricted without whatever is managing that part of cgroup hierarchy is not ok, at all. Please also note that nobody expects its processes to be stolen underneath it. This would be a management nightmare. Thanks. -- tejun