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:	Sat, 30 Nov 2013 16:05:47 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	linux@....linux.org.uk
Cc:	mareklindner@...mailbox.ch, sw@...onwunderlich.de,
	antonio@...hcoding.com, b.a.t.m.a.n@...ts.open-mesh.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH] Fix ARM BUILD_BUG_ON() errors with batman-adv

From: Russell King - ARM Linux <linux@....linux.org.uk>
Date: Sat, 30 Nov 2013 19:15:53 +0000

> so there should be no undesired side effect from this packing.

There is a huge side effect from ever using the packed attribute, in
that the compiler can assume absolutely nothing about the alignment of
any object or sub-object of the type you apply this attribute to.

Even if it is "obvious" that some members will be aligned, the
compiler cannot take advantage of this assumption because this
attribute also means that an array of such elements might have
arbitrary alignment.  So you when you get a pointer to one of these
objects, the compiler has to assume the worst possible case.

This means using 4 byte loads to load a 32-bit quantity, always,
unconditionally, no matter what.

That's why we should do whatever is necessary to align things properly
by hand, and use packed only as the last possible and least desirable
resort.

I'm not applying this, please try work to implement this more
acceptably first.

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