Re: [BUG] SLOB breaks Crypto

From: Adrian-Ken Rueegsegger
Date: Mon May 17 2010 - 17:50:21 EST


Geert Uytterhoeven wrote:
> On Fri, Mar 19, 2010 at 02:33, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
>> On Thu, Mar 18, 2010 at 10:24:41PM +0100, michael-dev@xxxxxxxxxxxxx wrote:
>>> Pekka Enberg schrieb:
>>>> Even with CONFIG_DEBUG_SLAB enabled or with CONFIG_SLUB and
>>>> CONFIG_SLUB_DEBUG_ON?
>>> no, these options have not been / are not enabled.
>> Can you please try it with those options enabled? That will tell
>> us if there is some latent bug in the crypto layer that only shows
>> up right away under SLOB.
>
> After seeing a posting from Nemoto-san on the linux-mips list (should
> show up soon on
> http://www.linux-mips.org/archives/linux-mips/2010-05/threads.html),
> I'm wondering if these defaults are the culprit;
>
> mm/slab.c:#define ARCH_KMALLOC_MINALIGN __alignof__(unsigned long long)
> mm/slob.c:#define ARCH_KMALLOC_MINALIGN __alignof__(unsigned long)
> mm/slub.c:#define ARCH_KMALLOC_MINALIGN __alignof__(unsigned long long)

Just a quick note: I changed this line in mm/slob.c to (unsigned long
long) and was able to load tcrypt without the kernel oopsing or
panic'ing. When running all test via

modprobe tcrypt

the tests seem to pass fine judging by /proc/crypto. Nevertheless module
insertion fails (as expected) but does not return EAGAIN but EMULTIHOP
instead...

Regards,
Adrian
--
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/