* Herbert Xu | 2007-05-18 16:30:01 [+1000]:
>> +static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, unsigned
>> int keylen,
>> + unsigned long alignmask)
>> +{
>> + struct cipher_alg *cia = &tfm->__crt_alg->cra_cipher;
>> + u8 buffer[keylen + alignmask];
>
>Hmm, I'm not comfortable with this since keylen could be unbounded,
>especially for hash algorithms. How about getting the memory via
>kmalloc instead?
Good point. I take kmalloc() with GFP_KERNEL (the caller should not be
atomic at this point). Additionaly I zero the temporary key (I don't
think the setkey() path is performace critical).
>Cheers,
Sebastian
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html