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:	Wed, 6 Jun 2007 14:42:29 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	David Woodhouse <dwmw2@...radead.org>
Cc:	Segher Boessenkool <segher@...nel.crashing.org>,
	Kyle Moffett <mrmacman_g4@....com>,
	John Stoffel <john@...ffel.org>, Willy Tarreau <w@....eu>,
	Evgeniy Polyakov <johnpol@....mipt.ru>, CaT <cat@....com.au>,
	Ondrej Zajicek <santiago@...reenet.org>,
	linux-kernel@...r.kernel.org, Bill Davidsen <davidsen@....com>,
	Jan Engelhardt <jengelh@...ux01.gwdg.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	Dongjun Shin <djshin90@...il.com>,
	Pekka Enberg <penberg@...helsinki.fi>,
	Albert Cahalan <acahalan@...il.com>,
	linux-fsdevel@...r.kernel.org, linux-mtd@...ts.infradead.org,
	Artem Bityutskiy <dedekind@...radead.org>,
	Sam Ravnborg <sam@...nborg.org>,
	Jamie Lokier <jamie@...reable.org>,
	Roland Dreier <rdreier@...co.com>,
	Jörn Engel <joern@...ybastard.org>,
	Pavel Machek <pavel@....cz>,
	Ulisses Furquim <ulissesf@...il.com>, akpm@...l.org,
	David Weinehall <tao@....umu.se>
Subject: Re: [Patch 04/18] include/linux/logfs.h

On Wednesday 06 June 2007, David Woodhouse wrote:
> And if I had something like this (which is admittedly contrived, but
> hardware people _do_ do stupid things to us):
>    { uint32_t, uint8_t, uint16_t, uint8_t, uint32_t, uint32_t }
> 
> With the 'packed' attribute the compiler would assume arbitrary
> alignment of all the 32-bit integers. But in reality it's only necessary
> for the uint16_t in the middle. A 'nopadding' attribute would deal with
> that correctly.

I would argue that a newly invented 'nopadding' attribute should reject
such a structure as invalid, because it should not let members be
unaligned. Unfortunately, this also gets tricky if you consider

struct {
	uint32_t a;
	uint64_t b;
	uint32_t c;
};

which does have an unaligned member by default in i386, but not on
any modern platform.

	Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ