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]
Date: Wed, 21 Jun 2023 14:38:39 +0800
From: Hao Lan <lanhao@...wei.com>
To: Paolo Abeni <pabeni@...hat.com>, <netdev@...r.kernel.org>
CC: <yisen.zhuang@...wei.com>, <salil.mehta@...wei.com>,
	<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
	<richardcochran@...il.com>, <wangpeiyang1@...wei.com>,
	<shenjian15@...wei.com>, <chenhao418@...wei.com>,
	<simon.horman@...igine.com>, <wangjie125@...wei.com>, <yuanjilin@...rlc.com>,
	<cai.huoqing@...ux.dev>, <xiujianfeng@...wei.com>
Subject: Re: [PATCH net-next v2 3/4] net: hns3: fix strncpy() not using
 dest-buf length as length issue



On 2023/6/14 18:34, Paolo Abeni wrote:
> On Mon, 2023-06-12 at 20:23 +0800, Hao Lan wrote:
>> From: Hao Chen <chenhao418@...wei.com>
>>
>> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
>> index d385ffc21876..0749515e270b 100644
>> --- a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
>> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
>> @@ -438,19 +438,36 @@ static void hns3_dbg_fill_content(char *content, u16 len,
>>  				  const struct hns3_dbg_item *items,
>>  				  const char **result, u16 size)
>>  {
>> +#define HNS3_DBG_LINE_END_LEN	2
> 
> IMHO this macro should be defined outside the function (just before)
> for better readability.
> 

Hi Paolo Abeni,
Thank you for your advice. We use this macro style elsewhere in our code.
The style is consistent. Here we keep this macro style.

Yours,
Hao Lan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ