lkml.org 
[lkml]   [2010]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [BUG] SLOB breaks Crypto
From
Date
On Tue, 2010-05-18 at 14:20 -0700, David Miller wrote:
> I think it does make sense to expect that, whatever my architecture
> defines or does not define, I can expect the allocators to provide the
> same minimum alignment guarentee.

In a sense, they do. The minimum alignment guarantee is sizeof(long).
You are guaranteed that no allocator will return memory blocks which are
aligned to anything less than that.

Some allocators may sometimes return memory blocks which are
better-aligned than that -- but that's not guaranteed behaviour. If you
_depend_ on that behaviour and it happens to vary with the phase of the
moon, that's your problem.

It would be better if the minimum alignment was exposed to generic code
though -- you're right that the CPP tests in linux/crypto.h really
shouldn't have to exist. If it wasn't for that, then the crypto problem
wouldn't have occurred.

--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation



\
 
 \ /
  Last update: 2010-05-19 01:23    [W:0.133 / U:37.036 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site