Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6: [CRYPTO] aes: Fixed array boundary violation [CRYPTO] tcrypt: Fix key alignment [CRYPTO] all: Add missing cra_alignmask [CRYPTO] all: Use kzalloc where possible [CRYPTO] api: Align tfm context as wide as possible [CRYPTO] twofish: Use rol32/ror32 where appropriate
This commit is contained in:
@@ -229,6 +229,8 @@ struct crypto_tfm {
|
||||
} crt_u;
|
||||
|
||||
struct crypto_alg *__crt_alg;
|
||||
|
||||
char __crt_ctx[] __attribute__ ((__aligned__));
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -301,7 +303,13 @@ static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm)
|
||||
|
||||
static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm)
|
||||
{
|
||||
return (void *)&tfm[1];
|
||||
return tfm->__crt_ctx;
|
||||
}
|
||||
|
||||
static inline unsigned int crypto_tfm_ctx_alignment(void)
|
||||
{
|
||||
struct crypto_tfm *tfm;
|
||||
return __alignof__(tfm->__crt_ctx);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user