lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKgNAkgEa9ZEHzoRWv7Y71eFVuFsy8Z4zSazZv9u7NRrx3xG9Q@mail.gmail.com>
Date:   Tue, 20 Feb 2018 20:26:59 +0100
From:   "Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>
To:     Tejun Heo <tj@...nel.org>
Cc:     "Serge E. Hallyn" <serge@...lyn.com>,
        lkml <linux-kernel@...r.kernel.org>,
        "open list:CONTROL GROUP (CGROUP)" <cgroups@...r.kernel.org>,
        Michael Kerrisk <mtk.manpages@...il.com>
Subject: A "domain invalid" cgroup *can* sometimes have member tasks

Hello Tejun

According to Documentation/cgroup-v2.txt, a "domain invalid" cgroup
can't have member tasks. And indeed this is generally not permitted.

However, someone recently showed me a scenario where a "domain
invalid" cgroup can have member processes. See the following example:

# mkdir -p /sys/fs/cgroup/unified/grp0/grp1
# sleep 1000 &
[1] 10549
# echo 10549 > /sys/fs/cgroup/unified/grp0/grp1/cgroup.procs
# echo threaded > /sys/fs/cgroup/unified/grp0/cgroup.type
# cat /sys/fs/cgroup/unified/grp0/cgroup.type
threaded
# cat /sys/fs/cgroup/unified/grp0/grp1/cgroup.type
domain invalid
# cat /sys/fs/cgroup/unified/grp0/grp1/cgroup.threads
10549

>From the above, we see that the cgroup grp0/grp1 is of type "domain
invalid" and has a member thread. This seems to be a violation of the
documented rules, and is I assume a bug, since in the above scenario,
we are denied from adding further tasks to the grp0/grp1 cgroup:

# sleep 2000 &
[2] 10553
# echo 10553 > /sys/fs/cgroup/unified/grp0/grp1/cgroup.procs
sh: echo: write error: Operation not supported

Could you comment please?

Thanks,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ