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: <1375390528.2034.77.camel@joe-AO722>
Date:	Thu, 01 Aug 2013 13:55:28 -0700
From:	Joe Perches <joe@...ches.com>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
Cc:	Olof Johansson <olof@...om.net>, Sam Creasey <sammy@...my.net>,
	Grant Grundler <grundler@...isc-linux.org>,
	Wan ZongShun <mcuos.com@...il.com>,
	Rajesh Borundia <rajesh.borundia@...gic.com>,
	Network Development <netdev@...r.kernel.org>,
	Sony Chacko <sony.chacko@...gic.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Manish Chopra <manish.chopra@...gic.com>,
	Don Fry <pcnet32@...ntier.com>,
	Ron Mercer <ron.mercer@...gic.com>,
	Andrew Gallatin <gallatin@...i.com>, linux-driver@...gic.com,
	Jitendra Kalsaria <jitendra.kalsaria@...gic.com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Shahed Shaikh <shahed.shaikh@...gic.com>
Subject: Re: [PATCH V2 3/3] ethernet: Convert mac address uses of 6 to
 ETH_ALEN

On Thu, 2013-08-01 at 21:33 +0100, Russell King - ARM Linux wrote:
> On Thu, Aug 01, 2013 at 01:31:09PM -0700, Olof Johansson wrote:
> > Hi,

Hi all.

> > On Thu, Aug 1, 2013 at 1:14 PM, Joe Perches <joe@...ches.com> wrote:
> > > diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.h b/drivers/net/ethernet/pasemi/pasemi_mac.h
[]
> > > @@ -79,11 +79,11 @@ struct pasemi_mac {
> > >         int             last_cs;
> > >         int             num_cs;
> > >         u32             dma_if;
> > > -       u8              type;
> > >  #define MAC_TYPE_GMAC  1
> > >  #define MAC_TYPE_XAUI  2
> > >
> > > -       u8              mac_addr[6];
> > > +       u8              mac_addr[ETH_ALEN];
> > > +       u8              type;
> > 
> > Just promote 'type' to u32 instead, saves you from moving the #defines
> > down, etc, etc.

type is already u8, why change it?
That would also change struct size.

> There's a more fundamental question which has to be asked: what is the
> point of moving that in the first place?

Some is_<foo>_ether_addr tests assume __aligned(2)
by a casting char * to u16/be16 * and dereferencing.

see patch 0/3 and include/linux/etherdevice.h


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