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: <661C8017.1070203@hisilicon.com>
Date: Mon, 15 Apr 2024 09:17:11 +0800
From: Wei Xu <xuwei5@...ilicon.com>
To: Huisong Li <lihuisong@...wei.com>
CC: <linux-kernel@...r.kernel.org>, <soc@...nel.org>,
	<linux-arm-kernel@...ts.infradead.org>, <Jonathan.Cameron@...wei.com>,
	<liuyonglong@...wei.com>, <xuwei5@...ilicon.com>
Subject: Re: [PATCH 1/2] soc: hisilicon: kunpeng_hccs: Add the check for obtaining
 complete port attribute

Hi Huisong,

On 2024/4/3 16:19, Huisong Li wrote:
> The hccs_get_all_port_attr() is used to obtained the attribute of all
> ports on a specified DIE from firmware. However, this interface doesn't
> ensure whether firmware reports the complete attribute of all ports or not.
> So this patch adds the check for this.
> 
> Signed-off-by: Huisong Li <lihuisong@...wei.com>
> ---
>  drivers/soc/hisilicon/kunpeng_hccs.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c
> index 9ff70b38e5e9..bb69a95b5f2d 100644
> --- a/drivers/soc/hisilicon/kunpeng_hccs.c
> +++ b/drivers/soc/hisilicon/kunpeng_hccs.c
> @@ -556,6 +556,12 @@ static int hccs_get_all_port_attr(struct hccs_dev *hdev,
>  		start_id = rsp_head.next_id;
>  	}
>  
> +	if (left_buf_len != 0) {
> +		dev_err(hdev->dev, "do not get the expected port number(%u) attribute.\n",

How about changing to "failed to get the expected port number(%u) attribute.\n"?

Best Regards,
Wei

> +			size);
> +		return -EINVAL;
> +	}
> +
>  	return 0;
>  }
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ