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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <df95cda2-71b5-403c-8644-3c114f69ba1a@huaweicloud.com>
Date: Fri, 14 Nov 2025 14:59:08 +0800
From: Chen Ridong <chenridong@...weicloud.com>
To: Sun Shaojie <sunshaojie@...inos.cn>
Cc: mkoutny@...e.com, llong@...hat.com, cgroups@...r.kernel.org,
 hannes@...xchg.org, linux-kernel@...r.kernel.org,
 linux-kselftest@...r.kernel.org, shuah@...nel.org, tj@...nel.org
Subject: Re: [PATCH v2] cpuset: relax the overlap check for cgroup-v2



On 2025/11/14 14:33, Sun Shaojie wrote:
> On 2025/11/14 08:50, Chen Ridong Wrote:
>> On 2025/11/13 21:14, Sun Shaojie wrote:
>>> ...
>>> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
>>> index 52468d2c178a..3240b3ab5998 100644
>>> --- a/kernel/cgroup/cpuset.c
>>> +++ b/kernel/cgroup/cpuset.c
>>> @@ -592,8 +592,13 @@ static inline bool cpusets_are_exclusive(struct cpuset *cs1, struct cpuset *cs2)
>>>   */
>>>  static inline bool cpus_excl_conflict(struct cpuset *cs1, struct cpuset *cs2)
>>>  {
>>> -	/* If either cpuset is exclusive, check if they are mutually exclusive */
>>> -	if (is_cpu_exclusive(cs1) || is_cpu_exclusive(cs2))
>>> +	/* If both cpusets are exclusive, check if they are mutually exclusive */
>>> +	if (is_cpu_exclusive(cs1) && is_cpu_exclusive(cs2))
>>> +		return !cpusets_are_exclusive(cs1, cs2);
>>> +
>>> +	/* In cgroup-v1, if either cpuset is exclusive, check if they are mutually exclusive */
>>> +	if (!is_in_v2_mode() &&
>>> +	    (is_cpu_exclusive(cs1) != is_cpu_exclusive(cs2)))
>>>  		return !cpusets_are_exclusive(cs1, cs2);
>>>  
>>
>> I prefer adding a helper function in the cpuset-v1.c file, similar to cpus_excl_conflict_legacy().
>>
>> For cpuset v1, it can simply return cpus_excl_conflict_legacy(). It seems that other rules are not
>> relevant to v1.
>>
>>>  	/* Exclusive_cpus cannot intersect */
> 
> Hi, Ridong,
> 
> Thank you for the suggestion.I will update the patch accordingly.
> 

If we are ready to relax this rule, adding the v1 logic in cpuset1_validate_change might be
appropriate. However, as I mentioned in my reply to Michal, I believe further discussion is needed.

-- 
Best regards,
Ridong


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ