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]
Message-ID: <20110113081336.GV29757@distanz.ch>
Date:	Thu, 13 Jan 2011 09:13:36 +0100
From:	Tobias Klauser <tklauser@...tanz.ch>
To:	David Miller <davem@...emloft.net>
Cc:	cmetcalf@...era.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next-2.6] netdev: tilepro: Use
	is_multicast_ether_addr helper

On 2011-01-13 at 08:42:50 +0100, David Miller <davem@...emloft.net> wrote:
> From: Tobias Klauser <tklauser@...tanz.ch>
> Date: Thu, 13 Jan 2011 07:58:55 +0100
> 
> > On 2011-01-13 at 03:45:01 +0100, David Miller <davem@...emloft.net> wrote:
> >> From: Chris Metcalf <cmetcalf@...era.com>
> >> Date: Wed, 12 Jan 2011 12:49:03 -0500
> >> 
> >> > On 1/12/2011 4:31 AM, Tobias Klauser wrote:
> >> >> Use is_multicast_ether_addr from linux/etherdevice.h instead of a custom
> >> >> macro. Also remove the broadcast address check, as it is considered a
> >> >> multicast address too.
> >> >>
> >> >> Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>
> >> >> ---
> >> >>  drivers/net/tile/tilepro.c |   10 +---------
> >> >>  1 files changed, 1 insertions(+), 9 deletions(-)
> >> > 
> >> > Thanks, I've taken this into the Tilera tree!
> >> 
> >> Don't, his transformation is buggy.
> > 
> > Why?
> > 
> > Doesn't the code want to make sure that only unicast addresses get
> > filtered?
> > 
> >> You can't get rid of the broadcast check, it needs to be there.
> >> Think about it.
> > 
> > If a unicast address is in buf, is_multicast_ether_addr returns false
> > (and is_broadcast_addr would too) and thus it would get filtered.
> 
> Ok, this may be correct, but it makes the code hard to read.
> 
> I think the old code, whilst redundant, is easier to understand.

Agreed. Thanks for clarifying.

> Why not add a function "is_unicast_ether_addr()" and use that
> here instead?

I'll send a patch to add the function to linux/etherdevice.h and an
updated patch for the tilepro driver as a follow up.
--
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