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: <1179499959.2859.579.camel@shinybook.infradead.org>
Date:	Fri, 18 May 2007 22:52:39 +0800
From:	David Woodhouse <dwmw2@...radead.org>
To:	"John Anthony Kazos Jr." <jakj@...-k-j.com>
Cc:	Matthieu CASTET <castet.matthieu@...e.fr>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ubi: kill homegrown endian macros

On Fri, 2007-05-18 at 07:52 -0400, John Anthony Kazos Jr. wrote:
> Out of curiosity, why would a compiler ever insert padding in a structure 
> that has all its elements properly-aligned? 

Well, it might decide it would be nicer if some elements were aligned to
64 bits. Or to a cache line. Or something. I don't care about _why_ --
the point is that it's _allowed_ to. Hence the original use of
__attribute__((packed)).

In practice, there's no real reason why it would do such a thing, which
is why I removed the packed attribute and replaced it with a runtime
check on the size of the structures in question.

-- 
dwmw2

-
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