Prev: [RELEASE] LTTng 0.214 for kernel 2.6.33.4
Next: vlynq: make whole Kconfig-menu dependant on architecture
From: Herbert Xu on 18 May 2010 06:30 On Tue, May 18, 2010 at 10:17:35AM +0200, Adrian-Ken Rueegsegger wrote: > > As noted in my other mail [1] it seems like the HMAC tests trigger these > errors. Thanks for all the detective work! I think the problem is this changeset: commit 6eb7228421c01ba48a6a88a7a5b3e71cfb70d4a9 Author: Herbert Xu <herbert(a)gondor.apana.org.au> Date: Tue Jan 8 17:16:44 2008 +1100 [CRYPTO] api: Set default CRYPTO_MINALIGN to unsigned long long Thanks to David Miller for pointing out that the SLAB (or SLOB/SLUB) cache uses the alignment of unsigned long long if the architecture kmalloc/slab alignment macros are not defined. This patch changes the CRYPTO_MINALIGN so that it uses the same default value. Signed-off-by: Herbert Xu <herbert(a)gondor.apana.org.au> diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 0aba104..5e02d1b 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -90,13 +90,11 @@ #define CRYPTO_MINALIGN ARCH_KMALLOC_MINALIGN #elif defined(ARCH_SLAB_MINALIGN) #define CRYPTO_MINALIGN ARCH_SLAB_MINALIGN +#else +#define CRYPTO_MINALIGN __alignof__(unsigned long long) #endif -#ifdef CRYPTO_MINALIGN #define CRYPTO_MINALIGN_ATTR __attribute__ ((__aligned__(CRYPTO_MINALIGN))) -#else -#define CRYPTO_MINALIGN_ATTR -#endif struct scatterlist; struct crypto_ablkcipher; So evidently the assumption made in this change does not work on SLOB since it only guarantees __alignof__(unsigned long). I think the simplest fix is to revert this changeset. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert(a)gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Pekka Enberg on 18 May 2010 10:10 Herbert Xu wrote: > On Tue, May 18, 2010 at 10:17:35AM +0200, Adrian-Ken Rueegsegger wrote: >> As noted in my other mail [1] it seems like the HMAC tests trigger these >> errors. > > Thanks for all the detective work! > > I think the problem is this changeset: > > commit 6eb7228421c01ba48a6a88a7a5b3e71cfb70d4a9 > Author: Herbert Xu <herbert(a)gondor.apana.org.au> > Date: Tue Jan 8 17:16:44 2008 +1100 > > [CRYPTO] api: Set default CRYPTO_MINALIGN to unsigned long long > > Thanks to David Miller for pointing out that the SLAB (or SLOB/SLUB) > cache uses the alignment of unsigned long long if the architecture > kmalloc/slab alignment macros are not defined. > > This patch changes the CRYPTO_MINALIGN so that it uses the same default > value. > > Signed-off-by: Herbert Xu <herbert(a)gondor.apana.org.au> > > diff --git a/include/linux/crypto.h b/include/linux/crypto.h > index 0aba104..5e02d1b 100644 > --- a/include/linux/crypto.h > +++ b/include/linux/crypto.h > @@ -90,13 +90,11 @@ > #define CRYPTO_MINALIGN ARCH_KMALLOC_MINALIGN > #elif defined(ARCH_SLAB_MINALIGN) > #define CRYPTO_MINALIGN ARCH_SLAB_MINALIGN > +#else > +#define CRYPTO_MINALIGN __alignof__(unsigned long long) > #endif > > -#ifdef CRYPTO_MINALIGN > #define CRYPTO_MINALIGN_ATTR __attribute__ ((__aligned__(CRYPTO_MINALIGN))) > -#else > -#define CRYPTO_MINALIGN_ATTR > -#endif > > struct scatterlist; > struct crypto_ablkcipher; > > So evidently the assumption made in this change does not work on > SLOB since it only guarantees __alignof__(unsigned long). > > I think the simplest fix is to revert this changeset. Sounds good to me. Acked-by: Pekka Enberg <penberg(a)cs.helsinki.fi> Pekka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Matt Mackall on 18 May 2010 15:10 On Tue, 2010-05-18 at 20:27 +1000, Herbert Xu wrote: > On Tue, May 18, 2010 at 10:17:35AM +0200, Adrian-Ken Rueegsegger wrote: > > > > As noted in my other mail [1] it seems like the HMAC tests trigger these > > errors. > > Thanks for all the detective work! > > I think the problem is this changeset: > > commit 6eb7228421c01ba48a6a88a7a5b3e71cfb70d4a9 > Author: Herbert Xu <herbert(a)gondor.apana.org.au> > Date: Tue Jan 8 17:16:44 2008 +1100 > > [CRYPTO] api: Set default CRYPTO_MINALIGN to unsigned long long > > Thanks to David Miller for pointing out that the SLAB (or SLOB/SLUB) > cache uses the alignment of unsigned long long if the architecture > kmalloc/slab alignment macros are not defined. > > This patch changes the CRYPTO_MINALIGN so that it uses the same default > value. > > Signed-off-by: Herbert Xu <herbert(a)gondor.apana.org.au> > > diff --git a/include/linux/crypto.h b/include/linux/crypto.h > index 0aba104..5e02d1b 100644 > --- a/include/linux/crypto.h > +++ b/include/linux/crypto.h > @@ -90,13 +90,11 @@ > #define CRYPTO_MINALIGN ARCH_KMALLOC_MINALIGN > #elif defined(ARCH_SLAB_MINALIGN) > #define CRYPTO_MINALIGN ARCH_SLAB_MINALIGN > +#else > +#define CRYPTO_MINALIGN __alignof__(unsigned long long) > #endif > > -#ifdef CRYPTO_MINALIGN > #define CRYPTO_MINALIGN_ATTR __attribute__ ((__aligned__(CRYPTO_MINALIGN))) > -#else > -#define CRYPTO_MINALIGN_ATTR > -#endif > > struct scatterlist; > struct crypto_ablkcipher; > > So evidently the assumption made in this change does not work on > SLOB since it only guarantees __alignof__(unsigned long). Bingo. Feel free to stick this on your revert: Acked-by: Matt Mackall <mpm(a)selenic.com> Looks like we should ensure that ARCH_KMALLOC_MINALIGN is always defined. -- Mathematics is the supreme nostalgia of our time. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: David Miller on 18 May 2010 15:30 From: Herbert Xu <herbert(a)gondor.apana.org.au> Date: Tue, 18 May 2010 20:27:01 +1000 > I think the simplest fix is to revert this changeset. If you revert then you'll break sparc. Sparc needs long long alignment, so it's SLOB that needs to change if it isn't providing at least that much alignment by default. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Adrian-Ken Rueegsegger on 18 May 2010 15:40
Herbert Xu wrote: > On Tue, May 18, 2010 at 10:17:35AM +0200, Adrian-Ken Rueegsegger wrote: >> As noted in my other mail [1] it seems like the HMAC tests trigger these >> errors. > > Thanks for all the detective work! > > I think the problem is this changeset: > > commit 6eb7228421c01ba48a6a88a7a5b3e71cfb70d4a9 > Author: Herbert Xu <herbert(a)gondor.apana.org.au> > Date: Tue Jan 8 17:16:44 2008 +1100 > > [CRYPTO] api: Set default CRYPTO_MINALIGN to unsigned long long > > Thanks to David Miller for pointing out that the SLAB (or SLOB/SLUB) > cache uses the alignment of unsigned long long if the architecture > kmalloc/slab alignment macros are not defined. > > This patch changes the CRYPTO_MINALIGN so that it uses the same default > value. > > Signed-off-by: Herbert Xu <herbert(a)gondor.apana.org.au> > > diff --git a/include/linux/crypto.h b/include/linux/crypto.h > index 0aba104..5e02d1b 100644 > --- a/include/linux/crypto.h > +++ b/include/linux/crypto.h > @@ -90,13 +90,11 @@ > #define CRYPTO_MINALIGN ARCH_KMALLOC_MINALIGN > #elif defined(ARCH_SLAB_MINALIGN) > #define CRYPTO_MINALIGN ARCH_SLAB_MINALIGN > +#else > +#define CRYPTO_MINALIGN __alignof__(unsigned long long) > #endif > > -#ifdef CRYPTO_MINALIGN > #define CRYPTO_MINALIGN_ATTR __attribute__ ((__aligned__(CRYPTO_MINALIGN))) > -#else > -#define CRYPTO_MINALIGN_ATTR > -#endif > > struct scatterlist; > struct crypto_ablkcipher; > > So evidently the assumption made in this change does not work on > SLOB since it only guarantees __alignof__(unsigned long). > > I think the simplest fix is to revert this changeset. When doing the revert it is necessary to either have ARCH_KMALLOC_MINALIGN defined or explicitly define CRYPTO_MINALIGN in the case where it is not. Otherwise shash compilation fails because it needs CRYPTO_MINALIGN. Regards, Adrian -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |