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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZrE7vkGZsBRdlaQP@slm.duckdns.org>
Date: Mon, 5 Aug 2024 10:53:18 -1000
From: Tejun Heo <tj@...nel.org>
To: Waiman Long <longman@...hat.com>
Cc: Zefan Li <lizefan.x@...edance.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Michal Koutný <mkoutny@...e.com>,
	Shuah Khan <shuah@...nel.org>, linux-kernel@...r.kernel.org,
	cgroups@...r.kernel.org, linux-kselftest@...r.kernel.org,
	Chen Ridong <chenridong@...wei.com>
Subject: Re: [PATCH-cgroup 2/5] cgroup/cpuset: Clear effective_xcpus on
 cpus_allowed clearing only if cpus.exclusive not set

On Sun, Aug 04, 2024 at 09:30:16PM -0400, Waiman Long wrote:
> Commit e2ffe502ba45 ("cgroup/cpuset: Add cpuset.cpus.exclusive for
> v2") adds a user writable cpuset.cpus.exclusive file for setting
> exclusive CPUs to be used for the creation of partitions. Since then
> effective_xcpus depends on both the cpuset.cpus and cpuset.cpus.exclusive
> setting. If cpuset.cpus.exclusive is set, effective_xcpus will depend
> only on cpuset.cpus.exclusive.  When it is not set, effective_xcpus
> will be set according to the cpuset.cpus value when the cpuset becomes
> a valid partition root.
> 
> When cpuset.cpus is being cleared by the user, effective_xcpus should
> only be cleared when cpuset.cpus.exclusive is not set. However, that
> is not currently the case.
> 
>   # cd /sys/fs/cgroup/
>   # mkdir test
>   # echo +cpuset > cgroup.subtree_control
>   # cd test
>   # echo 3 > cpuset.cpus.exclusive
>   # cat cpuset.cpus.exclusive.effective
>   3
>   # echo > cpuset.cpus
>   # cat cpuset.cpus.exclusive.effective // was cleared
> 
> Fix it by clearing effective_xcpus only if cpuset.cpus.exclusive is
> not set.
> 
> Fixes: e2ffe502ba45 ("cgroup/cpuset: Add cpuset.cpus.exclusive for v2")
> Reported-by: Chen Ridong <chenridong@...wei.com>
> Signed-off-by: Waiman Long <longman@...hat.com>

Applied 1-2 to cgroup/for-6.11-fixes w/ stable cc'd.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ