Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: akcipher - Move reqsize into tfm

The value of reqsize cannot be determined in case of fallbacks.
Therefore it must be stored in the tfm and not the alg object.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+5 -4
+4 -3
include/crypto/akcipher.h
··· 43 43 * struct crypto_akcipher - user-instantiated objects which encapsulate 44 44 * algorithms and core processing logic 45 45 * 46 + * @reqsize: Request context size required by algorithm implementation 46 47 * @base: Common crypto API algorithm data structure 47 48 */ 48 49 struct crypto_akcipher { 50 + unsigned int reqsize; 51 + 49 52 struct crypto_tfm base; 50 53 }; 51 54 ··· 89 86 * counterpart to @init, used to remove various changes set in 90 87 * @init. 91 88 * 92 - * @reqsize: Request context size required by algorithm implementation 93 89 * @base: Common crypto API algorithm data structure 94 90 */ 95 91 struct akcipher_alg { ··· 104 102 int (*init)(struct crypto_akcipher *tfm); 105 103 void (*exit)(struct crypto_akcipher *tfm); 106 104 107 - unsigned int reqsize; 108 105 struct crypto_alg base; 109 106 }; 110 107 ··· 156 155 157 156 static inline unsigned int crypto_akcipher_reqsize(struct crypto_akcipher *tfm) 158 157 { 159 - return crypto_akcipher_alg(tfm)->reqsize; 158 + return tfm->reqsize; 160 159 } 161 160 162 161 static inline void akcipher_request_set_tfm(struct akcipher_request *req,
+1 -1
include/crypto/internal/akcipher.h
··· 36 36 static inline void akcipher_set_reqsize(struct crypto_akcipher *akcipher, 37 37 unsigned int reqsize) 38 38 { 39 - crypto_akcipher_alg(akcipher)->reqsize = reqsize; 39 + akcipher->reqsize = reqsize; 40 40 } 41 41 42 42 static inline void *akcipher_tfm_ctx(struct crypto_akcipher *tfm)