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: <5d0f67d9-07fc-4e09-903a-dfc26c9f4a87@huaweicloud.com>
Date: Sat, 30 Aug 2025 09:33:09 +0800
From: Chen Ridong <chenridong@...weicloud.com>
To: Waiman Long <llong@...hat.com>, tj@...nel.org, hannes@...xchg.org,
 mkoutny@...e.com
Cc: cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
 lujialin4@...wei.com, chenridong@...wei.com
Subject: Re: [PATCH -next RFC 07/11] cpuset: refactor out
 invalidate_cs_partition



On 2025/8/30 3:56, Waiman Long wrote:
> 
> On 8/28/25 8:56 AM, Chen Ridong wrote:
>> From: Chen Ridong <chenridong@...wei.com>
>>
>> Refactor the invalidate_cs_partition function to handle cpuset partition
>> invalidation when modifying cpuset.cpus. This refactoring also makes the
>> function reusable for handling cpuset.cpus.exclusive updates in subsequent
>> patches.
>>
>> Signed-off-by: Chen Ridong <chenridong@...wei.com>
>> ---
>>   kernel/cgroup/cpuset.c | 49 +++++++++++++++++++++++++++++++-----------
>>   1 file changed, 36 insertions(+), 13 deletions(-)
>>
>> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
>> index 5cfc53fe717c..71190f142700 100644
>> --- a/kernel/cgroup/cpuset.c
>> +++ b/kernel/cgroup/cpuset.c
>> @@ -2376,6 +2376,40 @@ static int parse_cpulist(const char *buf, struct cpumask *out_mask)
>>       return 0;
>>   }
>>   +/**
>> + * invalidate_cs_partition - Validate and mark the validity of a cpuset partition configuration
> 
> The function name has "invalidate", but the description uses validate. It is confusing.
> 
> My suggestion
> 
>   validate_partition - Check the validity of a cpuset partition configuration
> 
>   Return 0 if valid, a non-zero prs_errcode otherwise
> 
> Cheers,
> Longman

Thank you Longman,

I originally used that name for a local value 'invalidated' within update_cpumask. However, since
subsequent patches have removed the invalidated, validate_partition would be a much more appropriate
name. I will update it accordingly.

-- 
Best regards,
Ridong


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ