From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752842AbcGYSiH (ORCPT ); Mon, 25 Jul 2016 14:38:07 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:33494 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751962AbcGYSiE (ORCPT ); Mon, 25 Jul 2016 14:38:04 -0400 Date: Mon, 25 Jul 2016 14:38:01 -0400 From: Tejun Heo To: Aleksa Sarai Cc: James Bottomley , 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: <20160725183801.GE19588@mtj.duckdns.org> References: <20160720231949.GB19588@mtj.duckdns.org> <379e5b13-29d4-ca75-1935-0a64f3db8d27@suse.de> <20160721145242.GB22680@htj.duckdns.org> <1469113456.2331.16.camel@HansenPartnership.com> <20160721150740.GF22680@htj.duckdns.org> <1469114194.2331.20.camel@HansenPartnership.com> <20160721152648.GA23759@htj.duckdns.org> <1469115276.2331.23.camel@HansenPartnership.com> <20160721155046.GB23759@htj.duckdns.org> <177bbc17-5c75-1ff8-0b1f-0c5601fa7e6b@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <177bbc17-5c75-1ff8-0b1f-0c5601fa7e6b@suse.de> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Aleksa. On Fri, Jul 22, 2016 at 06:30:07PM +1000, Aleksa Sarai wrote: > Just to be clear, the "ns subdir operation" is a cgroup namespaced process > moving A -> A_subdir which is racing against some administrative process > moving everything from A -> B (but not wanting to move A -> A_subdir)? Yes. > So should there be policy within the kernel to not permit a process outside > a cgroup namespace to move processes inside the namespace? Or would you be > concerned about people escaping the administrator's attempts to reorganise > the hierarchy? Pushed that far, I frankly can't assess what the implications and side-effects would be. > What if we extended rename(2) so that it /does/ allow for reorganisation of > the hierarchy? So an administrator could use rename to change the point at > which a cgroupns root is rooted at, but not be able to move the actual > processes within the cgroup namespace around? The administrator could also > join the cgroupns (without needing to join the userns) and then just move > things around that way? > > Do any of those suggestions seem reasonable? Unfortunately not. I get what you're trying to do and am sure we can make some specific scenarios work with the right set of hacks and holes, but this type of approach is very dangerous in the long term. The downside we have now is that we need an explicit delegation from userland and that stems from the architectural constraints of cgroupfs. It's not ideal but an acceptable situation. Let's please not riddle the whole thing with holes that we don't understand for an inconvenience which can be worked around otherwise. Thanks. -- tejun