Re: Cryptomgr race vs built-in aesni
From: Josh Boyer
Date: Thu Aug 11 2011 - 13:53:17 EST
> Fedora has had a bug open for a while with people seeing this upon boot:
> [ 0.807387] alg: skcipher: Failed to load transform for ecb-aes-aesni: -2
> We're still seeing it with the 3.0 kernel, so I poked at it today.
> So it seems that the aesni module is trying to register the ecb(aes) alg
> and before that completes (or something?) the test gets scheduled and
> tries to do a CRYPTO_MSG_ALG_REQUEST on something that hasn't
> finished it's module_init function yet. Eventually the aesni_init function
> completes successfully (the last printk), so I'm assuming that the
> module is still present but that particular algorithm is listed as unavailable.
Ok, so it's not what I thought it was. I did some more investigation today,
and it seems that the ablk_ebc_alg is missing the ivsize setting and the
crypto stack doesn't like that on a CRYPTO_ALG_TYPE_BLKCIPHER type. I added
ivsize = AES_BLOCK_SIZE, and the error message goes away entirely. This also
matches how ablk_cbc_alg works now, so I'm somewhat guessing this is correct.
My understanding of the crypto layer is at best non-existent, so if I'm wrong
please shout. I'll send a patch sortly.
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/