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]
Date:	Wed, 20 Jan 2016 14:44:08 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Lucas Tanure <tanure@...ux.com>,
	Shradha Shah <sshah@...arflare.com>
Cc:	Solarflare linux maintainers <linux-net-drivers@...arflare.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sfc: Replace memset with eth_zero_addr

Hello.

On 1/20/2016 2:27 AM, Lucas Tanure wrote:

> Use eth_zero_addr to assign the zero address to the given address array
> instead of memset when second argument is address of zero.

    What address? memset() takes just 1 address. :-)

> Signed-off-by: Lucas Tanure <tanure@...ux.com>
> ---
>   drivers/net/ethernet/sfc/ef10_sriov.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/sfc/ef10_sriov.c b/drivers/net/ethernet/sfc/ef10_sriov.c
> index 3c17f27..10f60db 100644
> --- a/drivers/net/ethernet/sfc/ef10_sriov.c
> +++ b/drivers/net/ethernet/sfc/ef10_sriov.c
> @@ -527,7 +527,7 @@ int efx_ef10_sriov_set_vf_mac(struct efx_nic *efx, int vf_i, u8 *mac)
>   	return 0;
>
>   fail:
> -	memset(vf->mac, 0, ETH_ALEN);
> +	eth_zero_addr(vf->mac);
>   	return rc;
>   }
>

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ