Re: [BUG] SLOB breaks Crypto

From: David Miller
Date: Wed May 19 2010 - 15:56:26 EST


From: Christoph Lameter <cl@xxxxxxxxx>
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/