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: <1305210816.5214.9.camel@bwh-desktop>
Date:	Thu, 12 May 2011 15:33:36 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Vitalii Demianets <vitas@...factor.kiev.ua>
Cc:	Jay Vosburgh <fubar@...ibm.com>,
	Andy Gospodarek <andy@...yhouse.net>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	netdev@...r.kernel.org, bonding-devel@...ts.sourceforge.net
Subject: Re: [PATCH] bonding,llc: Fix structure sizeof incompatibility for
 some PDUs

On Thu, 2011-05-12 at 15:57 +0300, Vitalii Demianets wrote:
> With some combinations of arch/compiler the sizeof operator on structure 
> returns value greater than expected.

Yes, some architecture ABIs set a minimum alignment for structures so
they can have greater alignment than any of their members.

> In cases when the structure is used for 
> mapping PDU fields it may lead to unexpected results (e.g. holes and 
> alignment problems in skb data). Attribute "packed" prevents this undesired 
> behavior.
[...]

The '__packed' macro is preferred.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

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