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] [day] [month] [year] [list]
Message-ID: <1983025922.01757323082896.JavaMail.epsvc@epcpadp2new>
Date: Mon, 8 Sep 2025 11:06:28 +0530
From: Neeraj Kumar <s.neeraj@...sung.com>
To: Ira Weiny <ira.weiny@...el.com>
Cc: linux-cxl@...r.kernel.org, nvdimm@...ts.linux.dev,
	linux-kernel@...r.kernel.org, gost.dev@...sung.com,
	a.manzanares@...sung.com, vishak.g@...sung.com, neeraj.kernel@...il.com,
	cpgs@...sung.com
Subject: Re: [PATCH V2 07/20] nvdimm/namespace_label: Update namespace
 init_labels and its region_uuid

On 05/09/25 03:08PM, Ira Weiny wrote:
>Neeraj Kumar wrote:
>> On 19/08/25 01:56PM, Ira Weiny wrote:
>> >Neeraj Kumar wrote:
>> >> nd_mapping->labels maintains the list of labels present into LSA.
>> >> init_labels() prepares this list while adding new label into LSA
>> >> and updates nd_mapping->labels accordingly. During cxl region
>> >> creation nd_mapping->labels list and LSA was updated with one
>> >> region label. Therefore during new namespace label creation
>> >> pre-include the previously created region label, so increase
>> >> num_labels count by 1.
>> >
>> >Why does the count of the labels in the list not work?
>> >
>> >static int init_labels(struct nd_mapping *nd_mapping, int num_labels)
>> >{
>> >        int i, old_num_labels = 0;
>> >...
>> >        mutex_lock(&nd_mapping->lock);
>> >        list_for_each_entry(label_ent, &nd_mapping->labels, list)
>> >                old_num_labels++;
>> >        mutex_unlock(&nd_mapping->lock);
>> >...
>> >
>>
>> Hi Ira,
>>
>> init_labels() allocates new label based on comparison with existing
>> count of the labels in the list and passed num_labels. If num_labels
>> is greater than count of the labels in the list then new label is
>> allocated and stored in list for later usage
>
>I think I'm following better but shouldn't this hunk be included in the
>code which creates the region label in the list?
>

Yes we can include this hunk in patch 5 where we are updating region
label. I will drop this commit and include it in patch 5.

>I'm concerned that this '+ 1' out of the blue and will be confusing in the
>future.  Why can't count be kept up to date when the region label was
>created and added?

Yes this '+1' is hardcoded and it creating confusion. I will fix this
with available region labels in the list.

>
>What code (patch) added this region label?
>
>Ira

Patch 5 add this region label using nd_pmem_region_label_update()


Regards,
Neeraj


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ