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, 19 May 2010 12:56:30 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	cl@...ux.com
Cc:	lethal@...ux-sh.org, penberg@...helsinki.fi, mpm@...enic.com,
	herbert@...dor.hengli.com.au, ken@...elabs.ch,
	geert@...ux-m68k.org, michael-dev@...i-braun.de,
	linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
	anemo@....ocn.ne.jp, dwmw2@...radead.org
Subject: Re: [BUG] SLOB breaks Crypto

From: Christoph Lameter <cl@...ux.com>
Date: Wed, 19 May 2010 10:19:33 -0500 (CDT)

> The assumptions are not arbitrary. It is reasonable to assume that
> structures managed by the slab allocators may contain long long variables
> and that therefore a unsigned long long alignment is required by the
> allocator. It is the *compiler* who tells us that long long needs to be
> aligned at double word boundaries. If an arch does not require long long
> alignment on double word boundaries then the *compiler* should tell us
> that and then the allocators will align on word boundaries.

That is a good point.

So really, __alignof__(unsigned long long) is technically always right.
Because it should evaluate to "4" on x86-32, for example.
--
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