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]
Message-ID: <20220628063703-mutt-send-email-mst@kernel.org>
Date:   Tue, 28 Jun 2022 06:37:20 -0400
From:   "Michael S. Tsirkin" <mst@...hat.com>
To:     Xu Qiang <xuqiang36@...wei.com>
Cc:     jasowang@...hat.com, elic@...dia.com, si-wei.liu@...cle.com,
        parav@...dia.com, virtualization@...ts.linux-foundation.org,
        linux-kernel@...r.kernel.org, rui.xiang@...wei.com
Subject: Re: [PATCH -next] vdpa/mlx5: Use eth_zero_addr() to assign zero
 address

On Tue, Jun 28, 2022 at 09:44:18AM +0000, Xu Qiang wrote:
> Using eth_zero_addr() to assign zero address insetad of

typo

> memset().
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Xu Qiang <xuqiang36@...wei.com>
> ---
>  drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index e85c1d71f4ed..f738c78ef446 100644
> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -1457,8 +1457,8 @@ static int mlx5_vdpa_add_mac_vlan_rules(struct mlx5_vdpa_net *ndev, u8 *mac,
>  
>  	*ucast = rule;
>  
> -	memset(dmac_c, 0, ETH_ALEN);
> -	memset(dmac_v, 0, ETH_ALEN);
> +	eth_zero_addr(dmac_c);
> +	eth_zero_addr(dmac_v);
>  	dmac_c[0] = 1;
>  	dmac_v[0] = 1;
>  	rule = mlx5_add_flow_rules(ndev->rxft, spec, &flow_act, &dest, 1);
> -- 
> 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ