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: <68bb43351ea_9916329427@iweiny-mobl.notmuch>
Date: Fri, 5 Sep 2025 15:08:21 -0500
From: Ira Weiny <ira.weiny@...el.com>
To: Neeraj Kumar <s.neeraj@...sung.com>, 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

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?

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?

What code (patch) added this region label?

Ira

[snip]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ