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:	Mon, 25 May 2015 10:37:13 -0700
From:	Joe Perches <joe@...ches.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Mateusz Kulikowski <mateusz.kulikowski@...il.com>,
	gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 06/35] staging: rtl8192e: Replace memcmp() with
 ether_addr_equal_unaligned()

On Mon, 2015-05-25 at 17:03 +0300, Dan Carpenter wrote:
> On Thu, May 21, 2015 at 05:53:19PM +0200, Mateusz Kulikowski wrote:
> > Use dedicated macro to compare ethernet addresses in probe_rq_parse().
> > 
> > Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@...il.com>
> > ---
> >  drivers/staging/rtl8192e/rtllib_softmac.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
> > index 8689b16..65297a0 100644
> > --- a/drivers/staging/rtl8192e/rtllib_softmac.c
> > +++ b/drivers/staging/rtl8192e/rtllib_softmac.c
> > @@ -1853,7 +1853,8 @@ static short probe_rq_parse(struct rtllib_device *ieee, struct sk_buff *skb,
> >  		return -1; /* corrupted */
> >  
> >  	bssid_match =
> > -	  (memcmp(header->addr3, ieee->current_network.bssid, ETH_ALEN) != 0) &&
> > +	  (!ether_addr_equal_unaligned(header->addr3,
> > +				       ieee->current_network.bssid)) &&
> 
> Isn't this aligned?
> 
> Joe, I really dread these checkpatch.pl patches.  It's the kind of thing
> I hate more as time goes on and not less...

Yeah,

I thought that Mateusz was going to send a
checkpatch patch for ether_addr_equal_unaligned
to make the memcpy thing a bit clearer.

Of course this thing is really only useful for
non x86 systems and then only when the memcpy is
in a fast-path like multicasting so really it's
not very commonly a significant improvement in
the first place.


--
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