All of lore.kernel.org
 help / color / mirror / Atom feed
* e2fsprogs alignment issues
@ 2012-07-11 13:20 Gordan Bobic
  2012-07-11 15:04 ` Eric Sandeen
  0 siblings, 1 reply; 8+ messages in thread
From: Gordan Bobic @ 2012-07-11 13:20 UTC (permalink / raw)
  To: linux-ext4

I would like to bring the following bug report to people's attention:

https://bugzilla.redhat.com/show_bug.cgi?id=680090

The issue is that the code used in e2fsprogs WRT allocating unaligned 
buffers and then casting them into structs is non-portable and dangerous 
- eyewateringly dangerous in something like e2fsprogs where it can lead 
to thorough trashing of the file system.

Can something be done to improve the portability of the userspace code?

The issue has been discussed on the Fedora-ARM mailing list:
http://lists.fedoraproject.org/pipermail/arm/2012-July/003637.html
but the argument there was that the issue needs to be fixed upstream, 
hence why I am posting it here.

This is an issue on all ARMs up to ARMv5, possibly ARMv6, and likely 
other CPU architectures that don't have transparent alignment fixup in 
hardware (Itanium, SPARC, probably others).

Apart from being dangerous, using unaligned arrays also affects 
performance because it leads to data needlessly straddling cache lines 
in the CPU. But that doesn't really matter in this case.

Many thanks.

Gordan

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-07-13 22:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-11 13:20 e2fsprogs alignment issues Gordan Bobic
2012-07-11 15:04 ` Eric Sandeen
2012-07-11 20:05   ` Theodore Ts'o
2012-07-11 21:22     ` Gordan Bobic
2012-07-12  0:05       ` Theodore Ts'o
2012-07-11 21:26     ` Eric Sandeen
2012-07-13 22:25     ` Dave Chinner
2012-07-11 21:24   ` Gordan Bobic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.