mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: chenridong <chenridong@huawei.com>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: <tj@kernel.org>, <lizefan.x@bytedance.com>, <hannes@cmpxchg.org>,
	<longman@redhat.com>, <cgroups@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cgroup: update some statememt about delegation
Date: Thu, 15 Aug 2024 20:28:51 +0800	[thread overview]
Message-ID: <5262cc0e-8e89-4ba0-8777-2ba49ec7c1f8@huawei.com> (raw)
In-Reply-To: <vrozw5w2l32ni43akbf3xceq6rqpkskdlwbp2ko32qxv546n6s@qtw4l3qt357v>



On 2024/8/15 20:12, Michal Koutný wrote:
> Hi,
> thanks for writing up on the care needed when you only use namespacing
> (and not de-privilgation) for delegation.
> 
> On Thu, Aug 15, 2024 at 02:41:18AM GMT, Chen Ridong <chenridong@huawei.com> wrote:
> ...
> 
> What about some more clarifications to prevent other confusions?
> 
>> --- a/Documentation/admin-guide/cgroup-v2.rst
>> +++ b/Documentation/admin-guide/cgroup-v2.rst
>> @@ -533,10 +533,12 @@ cgroup namespace on namespace creation.
>>   Because the resource control interface files in a given directory
>>   control the distribution of the parent's resources, the delegatee
>>   shouldn't be allowed to write to them.  For the first method, this is
>> -achieved by not granting access to these files.  For the second, the
>> -kernel rejects writes to all files other than "cgroup.procs" and
>> -"cgroup.subtree_control" on a namespace root from inside the
>> -namespace.
>> +achieved by not granting access to these files.  For the second, files
>> +outside the namespace shouldn't be visible from within the delegated
>                           should be hidden from the delegatee by the
> means of at least mount namespacing, and the kernel...
> 
>> +namespace, and the kernel rejects writes to all files on a namespace
>> +root from inside the namespace, except for those files listed in
>            inside the cgroup namespace
> 
>> +"/sys/kernel/cgroup/delegate" (including "cgroup.procs", "cgroup.threads",
>> +"cgroup.subtree_control", etc.).
>    
> ...
>> -	 * except for the files explicitly marked delegatable -
>> -	 * cgroup.procs and cgroup.subtree_control.
>> +	 * except for the set delegatable files shown in /sys/kernel/cgroup/delegate,
>> +	 * including cgroup.procs, cgroup.threads and cgroup.subtree_control, etc.
> 
> "Marked delegatable" (meaning CFTYPE_NS_DELEGATABLE) is appropriate
> comment in the code, a reference to the sysfs file is only consequential
> to this marking. A minimal change would be like:
> 
> -	 * cgroup.procs and cgroup.subtree_control.
> +	 * e.g. cgroup.procs and cgroup.subtree_control.
Thank you, Michal, I will send new patch.

Thanks,
Ridong

      reply	other threads:[~2024-08-15 12:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-15  2:41 Chen Ridong
2024-08-15 12:12 ` Michal Koutný
2024-08-15 12:28   ` chenridong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5262cc0e-8e89-4ba0-8777-2ba49ec7c1f8@huawei.com \
    --to=chenridong@huawei.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan.x@bytedance.com \
    --cc=longman@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®