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]
Date:	Sun, 01 Jun 2014 02:35:37 -0700
From:	Joe Perches <joe@...ches.com>
To:	Denis Pithon <denis.pithon@...il.com>
Cc:	gregkh@...uxfoundation.org, vitaly.osipov@...il.com,
	ztugcesirin@...il.com, josh@...htriplett.org, himangi774@...il.com,
	superna9999@...il.com, paul.gortmaker@...driver.com,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging/wlan-ng: use ether_addr_equal_unaligned

On Sun, 2014-06-01 at 09:22 +0200, Denis Pithon wrote:
> This patch get rid of all memcmp() on ethernet addresses in wlan-ng.
> Replaced with ether_addr_equal_unaligned().

ether_addr_equal_unaligned is only useful for
code symmetry when some uses are known to be
ether_addr_equal.

At least one of these conversions could/should be
ether_addr_equal.

Have you checked or did you just do a global
s/memcpy/ether_addr_equal_unaligned/ ?

> diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
[]
> @@ -1505,7 +1506,8 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
>  	 */
>  
>  	for (i = 0; i < hw->authlist.cnt; i++)
> -		if (memcmp(rec.sta_addr, hw->authlist.addr[i], ETH_ALEN) == 0)
> +		if (ether_addr_equal_unaligned(rec.sta_addr,
> +					       hw->authlist.addr[i]))

I looked at this one, both are __aligned(2)
I didn't look at any others.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ