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, 14 Jul 2014 08:46:51 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Stephen Hemminger' <stephen@...workplumber.org>,
	Thomas Graf <tgraf@...g.ch>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"therbert@...gle.com" <therbert@...gle.com>,
	"nicolas.dichtel@...nd.com" <nicolas.dichtel@...nd.com>,
	"pshelar@...ira.com" <pshelar@...ira.com>,
	"xiyou.wangcong@...il.com" <xiyou.wangcong@...il.com>,
	"ogerlitz@...lanox.com" <ogerlitz@...lanox.com>,
	"dborkman@...hat.com" <dborkman@...hat.com>,
	"Pritesh Kothari (pritkoth)" <pritkoth@...co.com>,
	Madhu Challa <challa@...ronetworks.com>
Subject: RE: [PATCH 1/2 net-next] vxlan: Be liberal on receive and only
 require the I bit to be set

From: Stephen Hemminger
> On Fri, 11 Jul 2014 18:59:49 +0200
> Thomas Graf <tgraf@...g.ch> wrote:
> 
> > @@ -1617,7 +1646,9 @@ static int vxlan6_xmit_skb(struct vxlan_sock *vs,
> >  	}
> >
> >  	vxh = (struct vxlanhdr *) __skb_push(skb, sizeof(*vxh));
> > -	vxh->vx_flags = htonl(VXLAN_FLAGS);
> > +	vxlan_flags(vxh) = VXLAN_FLAG_VNI;
> > +	vxh->vx_reserved1 = 0;
> > +	vxh->vx_reserved2 = 0;
> >  	vxh->vx_vni = vni;
> >
> 
> Okay, but initializing bitfields generates crappy code.
> Can we just alias and do one assignment.

If you write to all the bitfields gcc ought to manage to do a single write.
If it doesn't then all the bitfields should be ripped out :-)

	David



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