From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753208AbcGVITR (ORCPT ); Fri, 22 Jul 2016 04:19:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:60226 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751821AbcGVITM (ORCPT ); Fri, 22 Jul 2016 04:19:12 -0400 Subject: Re: [PATCH v1 3/3] cgroup: relax common ancestor restriction for direct descendants To: Tejun Heo , James Bottomley References: <20160718161816.13040-1-asarai@suse.de> <20160718161816.13040-4-asarai@suse.de> <20160720155147.GG4574@htj.duckdns.org> <6e975d80-4077-fb8b-ec84-708e37c8e149@suse.de> <20160720230228.GA19588@mtj.duckdns.org> <982fcf3a-3685-9bd7-dd95-7bff255c9421@suse.de> <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> 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 From: Aleksa Sarai Message-ID: <7e004486-b402-6e01-9893-c8751bcdb316@suse.de> Date: Fri, 22 Jul 2016 18:24:25 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160721150740.GF22680@htj.duckdns.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> It's about the debris left behind if the admin (or someone with >> delegated authority) moves the task to a wholly different cgroup. >> >> Now we have a cgroup directory in the old cgroup, which the current >> task has been removed from, for which the current user has permissions >> and could then move the task back to. Is that the essence of the >> problem? > > That'd be one side. The other side is the one moving. Let's say the > system admin thing wants to move all processe from A proper to B. It > would do that by draining processes from A's procs file into B's and > even that is multistep and can race. Once freezer is ported, wouldn't that allow you to stop the processes so you can drain them? I understand your concern with draining, but surely the same races occur if you fork? How many times would you need to scan cgroup.procs to make sure that you didn't miss anything (and if there's enough processes then cgroup.procs reads aren't atomic either). -- Aleksa Sarai Software Engineer (Containers) SUSE Linux GmbH https://www.cyphar.com/