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: <20251114063312.687950-1-sunshaojie@kylinos.cn>
Date: Fri, 14 Nov 2025 14:33:12 +0800
From: Sun Shaojie <sunshaojie@...inos.cn>
To: chenridong@...weicloud.com
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 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.

Thanks,
Sunshaojie

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ