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: <AE90C24D6B3A694183C094C60CF0A2F6026B7451@saturn3.aculab.com>
Date:	Mon, 2 Dec 2013 10:24:17 -0000
From:	"David Laight" <David.Laight@...LAB.COM>
To:	"Russell King - ARM Linux" <linux@....linux.org.uk>,
	"Antonio Quartulli" <antonio@...hcoding.com>
Cc:	"The list for a Better Approach To Mobile Ad-hoc Networking" 
	<b.a.t.m.a.n@...ts.open-mesh.org>, <netdev@...r.kernel.org>,
	"David Miller" <davem@...emloft.net>
Subject: RE: [B.A.T.M.A.N.] [PATCH] Fix ARM BUILD_BUG_ON() errors withbatman-adv

> The ARM compilers have for the last 20 years always aligned the size of
> structs to a multiple of 32 bits to ensure that members following a
> structure are appropriately aligned.

ARM has (or had) another one for the unwary, bitfields were also
always 32bits.

...
> The only solutions are: use the GCC packed attribute, redesign the
> structures...

It is probably enough to mark the inner structure containing the three
byte fields 'packed'.
Marking it aligned(1) might also have the desired effect.
The outer structure should then be ok.
But would need to use a specially named attribute so it doesn't
get removed.

In the past I've had to replace a struct with an array in order
to avoid a similar alignment rule for structs.

	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