[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1005191017290.4592@router.home>
Date: Wed, 19 May 2010 10:19:33 -0500 (CDT)
From: Christoph Lameter <cl@...ux.com>
To: Paul Mundt <lethal@...ux-sh.org>
cc: David Miller <davem@...emloft.net>, 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, David Woodhouse <dwmw2@...radead.org>
Subject: Re: [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.
--
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