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: <20260123110807.yyzfhvb3vps3vzll@test-PowerEdge-R740xd>
Date: Fri, 23 Jan 2026 16:38:07 +0530
From: Neeraj Kumar <s.neeraj@...sung.com>
To: Jonathan Cameron <jonathan.cameron@...wei.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 V5 08/17] nvdimm/label: Preserve cxl region information
 from region label

On 15/01/26 06:03PM, Jonathan Cameron wrote:
>On Fri,  9 Jan 2026 18:14:28 +0530
>Neeraj Kumar <s.neeraj@...sung.com> wrote:
>
>> Preserve region information from region label during nvdimm_probe. This
>> preserved region information is used for creating cxl region to achieve
>> region persistency across reboot.
>> This patch supports interleave way == 1, it is therefore it preserves
>> only one region into LSA
>>
>> Reviewed-by: Dave Jiang <dave.jiang@...el.com>
>> Signed-off-by: Neeraj Kumar <s.neeraj@...sung.com>
>
>With change to import for getting the region uuid,
>Reviewed-by: Jonathan Cameron <jonathan.cameron@...wei.com>
>
>> diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
>> index 2ad148bfe40b..7adb415f0926 100644
>> --- a/drivers/nvdimm/label.c
>> +++ b/drivers/nvdimm/label.c
>> @@ -494,6 +494,42 @@ int nd_label_reserve_dpa(struct nvdimm_drvdata *ndd)
>>  	return 0;
>>  }
>>
>> +int nvdimm_cxl_region_preserve(struct nvdimm_drvdata *ndd)
>> +{
>> +	struct nvdimm *nvdimm = to_nvdimm(ndd->dev);
>> +	struct cxl_pmem_region_params *p = &nvdimm->cxl_region_params;
>> +	struct nd_namespace_index *nsindex;
>> +	unsigned long *free;
>> +	u32 nslot, slot;
>> +
>> +	if (!preamble_current(ndd, &nsindex, &free, &nslot))
>> +		return 0; /* no label, nothing to preserve */
>> +
>> +	for_each_clear_bit_le(slot, free, nslot) {
>> +		union nd_lsa_label *lsa_label = to_lsa_label(ndd, slot);
>> +		struct cxl_region_label *region_label = &lsa_label->region_label;
>> +		uuid_t *region_uuid = (uuid_t *)&region_label->type;
>
>Another case where I think we should be importing.
>I'm not entirely sure why that's the convention for these but we
>should probably stick to it anyway.
>

Fixed it accordingly. Thanks Jonathan for RB tag



Regards,
Neeraj


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ