lkml.org 
[lkml]   [2010]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG] SLOB breaks Crypto
On Wed, 19 May 2010, Paul Mundt wrote:

> > > So one of two things should happen:
> > >
> > > 1) SLOB conforms to SLAB/SLUB in it's test
> > >
> > > 2) SLAB/SLUB conforms to SLOB in it's test
> > >
> > > And yes this is an either-or, you can't say they are both valid.
> >
> > I don't see any reason to punish SLOB for the assumptions that SLAB/SLUB
> > arbitrarily took up, presumably on an architecture that should have
> > specified its own alignment requirements and simply couldn't be bothered.
> > Making SLAB redzoning work with arbitrary alignment is another matter
> > entirely, and something that should probably be revisited.
> >
> > Anything that assumes more than BYTES_PER_WORD is simply broken and
> > should be reverted.

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.





\
 
 \ /
  Last update: 2010-05-19 17:27    [W:2.716 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site