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:	Tue, 03 Mar 2015 10:00:19 +0100
From:	Johannes Berg <johannes@...solutions.net>
To:	Joe Perches <joe@...ches.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
	linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 13/14] wireless: Use eth_<foo>_addr instead of
 memset

On Tue, 2015-03-03 at 00:52 -0800, Joe Perches wrote:

> > > My guess is the eth_zero_addr and eth_broadcast functions
> > > are always taking aligned(2) arguments, just like all the
> > > is_<foo>_ether_addr functions.
> > 
> > Err, are you serious???
> 
> Yes.
> 
> > That *clearly* isn't true, and if it was then
> > this patch wouldn't be safe at all.
> 
> And why is that?
> 
> Until patch 1 of this series, eth_zero_addr and
> eth_broadcast_addr was just an inline for a memset.
> 
> Even after patch 1, it's effectively still memset.

Exactly. It therefore *doesn't* require an aligned(2) argument, unlike
what you stated above, hence my question if you're serious (and perhaps
looking at some other code that I don't have).

My argument/complaint is that it isn't obvious from these which ones do
require aligned(2) argument. Therefore, it's not obvious without going
back to the definitions where the conversion is safe and where it isn't.
Clearly, for example, memcmp() cannot always be replaced with
ether_addr_equal().

johannes

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ