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: <b9b04261-a6e8-4dae-9b41-3b8045811a74@huawei.com>
Date: Tue, 12 Mar 2024 11:42:55 +0800
From: Jijie Shao <shaojijie@...wei.com>
To: Ratheesh Kannoth <rkannoth@...vell.com>
CC: <shaojijie@...wei.com>, <yisen.zhuang@...wei.com>,
	<salil.mehta@...wei.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
	<kuba@...nel.org>, <pabeni@...hat.com>, <jiri@...nulli.us>,
	<shenjian15@...wei.com>, <wangjie125@...wei.com>, <liuyonglong@...wei.com>,
	<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V5 net-next 3/4] net: hns3: dump more reg info based on
 ras mod


on 2024/3/12 11:03, Ratheesh Kannoth wrote:
> On 2024-03-09 at 15:30:43, Jijie Shao (shaojijie@...wei.com) wrote:
>> +		}
>> +
>> +		pos = scnprintf(buf, HCLGE_MOD_REG_INFO_LEN_MAX, "%s",
>> +				reg_info[i].reg_name);
>> +		if (reg_info[i].has_suffix)
>> +			pos += scnprintf(buf + pos,
>> +					 HCLGE_MOD_REG_INFO_LEN_MAX - pos, "%u",
>> +					 le32_to_cpu(desc->data[0]));
>> +		pos += scnprintf(buf + pos,
>> +				 HCLGE_MOD_REG_INFO_LEN_MAX - pos,
>> +				 ":");
>> +		for (j = 0; j < reg_info[i].group_size; j++) {
>> +			offset = reg_info[i].reg_offset_group[j];
>> +			index = offset % HCLGE_DESC_DATA_LEN;
>> +			bd_idx = offset / HCLGE_DESC_DATA_LEN;
>> +			pos += scnprintf(buf + pos,
>> +					 HCLGE_MOD_REG_INFO_LEN_MAX - pos,
>> +					 " %08x",
>> +					 le32_to_cpu(desc[bd_idx].data[index]));
>> +		}
>> +		buf[pos] = '\0';
> ASFAIK, scnprintf does null terminate the string.

Yeah, you're right. I will send v6 to delete it


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ