OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c98d62
)
crypto: api - Include alignment in crypto_alg_extsize
author
Herbert Xu
<herbert@gondor.apana.org.au>
Thu, 28 May 2015 14:07:56 +0000
(22:07 +0800)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Wed, 3 Jun 2015 02:48:34 +0000
(10:48 +0800)
This patch ensures that the tfm context always has enough extra
memory to ensure that it is aligned according to cra_alignment.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/algapi.c
patch
|
blob
|
history
diff --git
a/crypto/algapi.c
b/crypto/algapi.c
index
abf100c
..
3c079b7
100644
(file)
--- a/
crypto/algapi.c
+++ b/
crypto/algapi.c
@@
-980,7
+980,8
@@
EXPORT_SYMBOL_GPL(crypto_xor);
unsigned int crypto_alg_extsize(struct crypto_alg *alg)
{
- return alg->cra_ctxsize;
+ return alg->cra_ctxsize +
+ (alg->cra_alignmask & ~(crypto_tfm_ctx_alignment() - 1));
}
EXPORT_SYMBOL_GPL(crypto_alg_extsize);