lkml.org 
[lkml]   [2016]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v1 3/3] cgroup: relax common ancestor restriction for direct descendants
From
Date
>> So if I as the cgroup ns owner am moving a task from A to A_subdir, the
>> admin scanning tasks in all of A may miss this task in motion because
>> all the tasks files can't be scanned atomically?
>
> So, the admin just wants to move processes from A and only A to B. It
> doesn't wanna interfere with processes in the subdirs or on-going ns
> operations, but if the race occurs, both A -> B migration and ns
> subdir operation would succeed and the end result would be something
> neither expects.

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)?

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?

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?

--
Aleksa Sarai
Software Engineer (Containers)
SUSE Linux GmbH
https://www.cyphar.com/

\
 
 \ /
  Last update: 2016-07-22 11:01    [W:0.441 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site