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: <db91817d295770e459727005108b05e2@kernel.crashing.org>
Date:	Tue, 5 Jun 2007 20:49:09 +0200
From:	Segher Boessenkool <segher@...nel.crashing.org>
To:	David Woodhouse <dwmw2@...radead.org>
Cc:	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>,
	Arnd Bergmann <arnd@...db.de>,
	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

>>> It would be better if GCC had a 'nopadding' attribute which gave us
>>> what we need without the _extra_ implications about alignment.
>>
>> That's impossible; removing the padding from a struct
>> _will_ make accesses to its members unaligned (think
>> about arrays of that struct).
>
> It _might_ make accesses to _some_ of its members unaligned.

It _will_ make accesses to _at least one_ of the members
unaligned, in the second array element.

> That's why I said 'without the __EXTRA__ implications about alignment'.
>
> Obviously the lack of padding has its own implications, but we don't
> necessarily need to assume that the struct may be at arbitrary
> locations.

The compiler does though, if it can't prove otherwise.

What would "nopadding" buy us, anyway?


Segher

-
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