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: <56C60006.3090401@redhat.com>
Date:	Thu, 18 Feb 2016 12:31:50 -0500
From:	Doug Ledford <dledford@...hat.com>
To:	Amitoj Kaur Chawla <amitoj1606@...il.com>, sean.hefty@...el.com,
	hal.rosenstock@...il.com, linux-rdma@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc:	julia.lawall@...6.fr
Subject: Re: [PATCH] IB/core: Replace memset with eth_zero_addr

On 2/12/2016 2:46 AM, Amitoj Kaur Chawla 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.
> 
> The Coccinelle semantic patch used to make this change is as follows:
> 
> // <smpl>
> @eth_zero_addr@
> expression e;
> @@
> 
> -memset(e,0x00,ETH_ALEN);
> +eth_zero_addr(e);
> // </smpl>
> 
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@...il.com>

Thanks, applied.

> ---
>  drivers/infiniband/core/sa_query.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
> index f334090..4b3ac76 100644
> --- a/drivers/infiniband/core/sa_query.c
> +++ b/drivers/infiniband/core/sa_query.c
> @@ -1221,7 +1221,7 @@ static void ib_sa_path_rec_callback(struct ib_sa_query *sa_query,
>  		rec.net = NULL;
>  		rec.ifindex = 0;
>  		rec.gid_type = IB_GID_TYPE_IB;
> -		memset(rec.dmac, 0, ETH_ALEN);
> +		eth_zero_addr(rec.dmac);
>  		query->callback(status, &rec, query->context);
>  	} else
>  		query->callback(status, NULL, query->context);
> 



Download attachment "signature.asc" of type "application/pgp-signature" (885 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ