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: <20240515152220.GM154012@kernel.org>
Date: Wed, 15 May 2024 16:22:20 +0100
From: Simon Horman <horms@...nel.org>
To: Mengyuan Lou <mengyuanlou@...-swift.com>
Cc: netdev@...r.kernel.org, jiawenwu@...stnetic.com,
	duanqiangwen@...-swift.com
Subject: Re: [PATCH net-next v3 5/6] net: ngbe: add sriov function support

On Wed, May 15, 2024 at 05:50:08PM +0800, Mengyuan Lou wrote:
> Add sriov_configure for driver ops.
> Add mailbox handler wx_msg_task for ngbe in
> the interrupt handler.
> Add the notification flow when the vfs exist.
> 
> Signed-off-by: Mengyuan Lou <mengyuanlou@...-swift.com>

...

> +void wx_ping_all_vfs_with_link_status(struct wx *wx, bool link_up)
> +{
> +	u32 msgbuf[2] = {0, 0};
> +	u16 i;
> +
> +	if (!wx->num_vfs)
> +		return;
> +	msgbuf[0] = WX_PF_NOFITY_VF_LINK_STATUS | WX_PF_CONTROL_MSG;
> +	if (link_up)
> +		msgbuf[1] = (wx->speed << 1) | link_up;
> +	if (wx->vfinfo[i].clear_to_send)

Hi Mengyuan Lou,

i appears to be used uninitialised here.

Flagged by clang-18 W=1, and Smatch.

> +		msgbuf[0] |= WX_VT_MSGTYPE_CTS;
> +	if (wx->notify_not_runnning)
> +		msgbuf[1] |= WX_PF_NOFITY_VF_NET_NOT_RUNNING;
> +	for (i = 0 ; i < wx->num_vfs; i++)
> +		wx_write_mbx_pf(wx, msgbuf, 2, i);
> +}
> +EXPORT_SYMBOL(wx_ping_all_vfs_with_link_status);

...

-- 
pw-bot: changes-requested

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ