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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1296674576.21759726381948.JavaMail.epsvc@epcpadp2new>
Date: Mon, 29 Sep 2025 18:47:56 +0530
From: Neeraj Kumar <s.neeraj@...sung.com>
To: Dave Jiang <dave.jiang@...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, Jonathan Cameron <jonathan.cameron@...wei.com>
Subject: Re: [PATCH V3 08/20] nvdimm/label: Include region label in slot
 validation

On 22/09/25 03:17PM, Dave Jiang wrote:
>>  static void region_label_calculate_checksum(struct nvdimm_drvdata *ndd,
>>  				   struct cxl_region_label *region_label)
>>  {
>> @@ -392,16 +404,30 @@ static void region_label_calculate_checksum(struct nvdimm_drvdata *ndd,
>>  }
>>
>>  static bool slot_valid(struct nvdimm_drvdata *ndd,
>> -		struct nd_namespace_label *nd_label, u32 slot)
>> +		       union nd_lsa_label *lsa_label, u32 slot)
>>  {
>> +	struct cxl_region_label *region_label = &lsa_label->region_label;
>> +	struct nd_namespace_label *nd_label = &lsa_label->ns_label;
>> +	char *label_name;
>>  	bool valid;
>>
>>  	/* check that we are written where we expect to be written */
>> -	if (slot != nsl_get_slot(ndd, nd_label))
>> -		return false;
>> -	valid = nsl_validate_checksum(ndd, nd_label);
>> +	if (is_region_label(ndd, lsa_label)) {
>> +		label_name = "rg";
>
>I suggest create a static string table enumerated by 'enum label_type'. That way you can directly address it by 'label_name[ltype]' when being used instead of assigning at run time. And maybe just use "region" and "namespace" since it's for debug output and we don't need to shorten it.
>
>DJ

Sure Dave, Thanks for your suggestion. I will fix it accordingly

Regards,
Neeraj


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ