mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
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:
commit
ec1248e70e
10 changed files with 49 additions and 38 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue