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: <decbc1a1-878e-394d-ca64-667fb4678cc7@huawei.com>
Date:   Wed, 18 Jan 2023 20:36:47 +0800
From:   "wangjie (L)" <wangjie125@...wei.com>
To:     Paolo Abeni <pabeni@...hat.com>, Hao Lan <lanhao@...wei.com>,
        <kuba@...nel.org>, Leon Romanovsky <leon@...nel.org>
CC:     <yisen.zhuang@...wei.com>, <salil.mehta@...wei.com>,
        <edumazet@...gle.com>, <richardcochran@...il.com>,
        <shenjian15@...wei.com>, <netdev@...r.kernel.org>,
        <davem@...emloft.net>
Subject: Re: [PATCH net-next 2/2] net: hns3: add vf fault process in hns3 ras



On 2023/1/17 16:04, Paolo Abeni wrote:
> Hello,
>
> On Fri, 2023-01-13 at 10:08 +0800, Hao Lan wrote:
> [...]
>
>> +static void hclge_get_vf_fault_bitmap(struct hclge_desc *desc,
>> +				      unsigned long *bitmap)
>> +{
>> +#define HCLGE_FIR_FAULT_BYTES	24
>> +#define HCLGE_SEC_FAULT_BYTES	8
>> +
>> +	u8 *buff;
>> +
>> +	memcpy(bitmap, desc[0].data, HCLGE_FIR_FAULT_BYTES);
>> +	buff = (u8 *)bitmap + HCLGE_FIR_FAULT_BYTES;
>> +	memcpy(buff, desc[1].data, HCLGE_SEC_FAULT_BYTES);
>> +}
>
> The above works under the assumption that:
>
> 	HCLGE_FIR_FAULT_BYTES + HCLGE_SEC_FAULT_BYTES == BITS_TO_BYTES(HCLGE_VPORT_NUM)
>
> I think it's better to enforce such condition at build time with a
> BUILD_BUG_ON(), to avoid future issues.
>

OK, I will add it in v2

> Also I think Leon still deserve a reply to one of his questions,
> specifically: What will happen (at recovery time) with driver bound to
> this VF?
>
> Thanks!
>
> Paolo
>
> .
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ