tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 6ecc9d9ff91ff26769e58164b6216c6189cb8302 commit: 56e8e57fc3a707bf4f23f88c4822e6cbc9a950dc [68/69] crypto: morus - Add common SIMD glue code for MORUS config: s390-allmodconfig (attached as .config) compiler: s390x-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 56e8e57fc3a707bf4f23f88c4822e6cbc9a950dc # save the attached .config to linux build tree make.cross ARCH=s390 All errors (new ones prefixed by >>): crypto/morus640_glue.c: In function 'crypto_morus640_glue_crypt': >> crypto/morus640_glue.c:147:2: error: too few arguments to function 'kernel_fpu_begin' kernel_fpu_begin(); ^~~~~~~~~~~~~~~~ In file included from crypto/morus640_glue.c:24:0: arch/s390/include/asm/fpu/api.h:94:20: note: declared here static inline void kernel_fpu_begin(struct kernel_fpu *state, u32 flags) ^~~~~~~~~~~~~~~~ >> crypto/morus640_glue.c:154:2: error: too few arguments to function 'kernel_fpu_end' kernel_fpu_end(); ^~~~~~~~~~~~~~ In file included from crypto/morus640_glue.c:24:0: arch/s390/include/asm/fpu/api.h:107:20: note: declared here static inline void kernel_fpu_end(struct kernel_fpu *state, u32 flags) ^~~~~~~~~~~~~~ crypto/morus640_glue.c: In function 'cryptd_morus640_glue_encrypt': >> crypto/morus640_glue.c:239:6: error: implicit declaration of function 'irq_fpu_usable'; did you mean '__cpu_disable'? [-Werror=implicit-function-declaration] if (irq_fpu_usable() && (!in_atomic() || ^~~~~~~~~~~~~~ __cpu_disable cc1: some warnings being treated as errors -- crypto/morus1280_glue.c: In function 'crypto_morus1280_glue_crypt': >> crypto/morus1280_glue.c:151:2: error: too few arguments to function 'kernel_fpu_begin' kernel_fpu_begin(); ^~~~~~~~~~~~~~~~ In file included from crypto/morus1280_glue.c:24:0: arch/s390/include/asm/fpu/api.h:94:20: note: declared here static inline void kernel_fpu_begin(struct kernel_fpu *state, u32 flags) ^~~~~~~~~~~~~~~~ >> crypto/morus1280_glue.c:158:2: error: too few arguments to function 'kernel_fpu_end' kernel_fpu_end(); ^~~~~~~~~~~~~~ In file included from crypto/morus1280_glue.c:24:0: arch/s390/include/asm/fpu/api.h:107:20: note: declared here static inline void kernel_fpu_end(struct kernel_fpu *state, u32 flags) ^~~~~~~~~~~~~~ crypto/morus1280_glue.c: In function 'cryptd_morus1280_glue_encrypt': >> crypto/morus1280_glue.c:243:6: error: implicit declaration of function 'irq_fpu_usable'; did you mean '__cpu_disable'? [-Werror=implicit-function-declaration] if (irq_fpu_usable() && (!in_atomic() || ^~~~~~~~~~~~~~ __cpu_disable cc1: some warnings being treated as errors vim +/kernel_fpu_begin +147 crypto/morus640_glue.c 137 138 static void crypto_morus640_glue_crypt(struct aead_request *req, 139 struct morus640_ops ops, 140 unsigned int cryptlen, 141 struct morus640_block *tag_xor) 142 { 143 struct crypto_aead *tfm = crypto_aead_reqtfm(req); 144 struct morus640_ctx *ctx = crypto_aead_ctx(tfm); 145 struct morus640_state state; 146 > 147 kernel_fpu_begin(); 148 149 ctx->ops->init(&state, &ctx->key, req->iv); 150 crypto_morus640_glue_process_ad(&state, ctx->ops, req->src, req->assoclen); 151 crypto_morus640_glue_process_crypt(&state, ops, req); 152 ctx->ops->final(&state, tag_xor, req->assoclen, cryptlen); 153 > 154 kernel_fpu_end(); 155 } 156 157 int crypto_morus640_glue_encrypt(struct aead_request *req) 158 { 159 struct crypto_aead *tfm = crypto_aead_reqtfm(req); 160 struct morus640_ctx *ctx = crypto_aead_ctx(tfm); 161 struct morus640_ops OPS = { 162 .skcipher_walk_init = skcipher_walk_aead_encrypt, 163 .crypt_blocks = ctx->ops->enc, 164 .crypt_tail = ctx->ops->enc_tail, 165 }; 166 167 struct morus640_block tag = {}; 168 unsigned int authsize = crypto_aead_authsize(tfm); 169 unsigned int cryptlen = req->cryptlen; 170 171 crypto_morus640_glue_crypt(req, OPS, cryptlen, &tag); 172 173 scatterwalk_map_and_copy(tag.bytes, req->dst, 174 req->assoclen + cryptlen, authsize, 1); 175 return 0; 176 } 177 EXPORT_SYMBOL_GPL(crypto_morus640_glue_encrypt); 178 179 int crypto_morus640_glue_decrypt(struct aead_request *req) 180 { 181 static const u8 zeros[MORUS640_BLOCK_SIZE] = {}; 182 183 struct crypto_aead *tfm = crypto_aead_reqtfm(req); 184 struct morus640_ctx *ctx = crypto_aead_ctx(tfm); 185 struct morus640_ops OPS = { 186 .skcipher_walk_init = skcipher_walk_aead_decrypt, 187 .crypt_blocks = ctx->ops->dec, 188 .crypt_tail = ctx->ops->dec_tail, 189 }; 190 191 struct morus640_block tag; 192 unsigned int authsize = crypto_aead_authsize(tfm); 193 unsigned int cryptlen = req->cryptlen - authsize; 194 195 scatterwalk_map_and_copy(tag.bytes, req->src, 196 req->assoclen + cryptlen, authsize, 0); 197 198 crypto_morus640_glue_crypt(req, OPS, cryptlen, &tag); 199 200 return crypto_memneq(tag.bytes, zeros, authsize) ? -EBADMSG : 0; 201 } 202 EXPORT_SYMBOL_GPL(crypto_morus640_glue_decrypt); 203 204 void crypto_morus640_glue_init_ops(struct crypto_aead *aead, 205 const struct morus640_glue_ops *ops) 206 { 207 struct morus640_ctx *ctx = crypto_aead_ctx(aead); 208 ctx->ops = ops; 209 } 210 EXPORT_SYMBOL_GPL(crypto_morus640_glue_init_ops); 211 212 int cryptd_morus640_glue_setkey(struct crypto_aead *aead, const u8 *key, 213 unsigned int keylen) 214 { 215 struct cryptd_aead **ctx = crypto_aead_ctx(aead); 216 struct cryptd_aead *cryptd_tfm = *ctx; 217 218 return crypto_aead_setkey(&cryptd_tfm->base, key, keylen); 219 } 220 EXPORT_SYMBOL_GPL(cryptd_morus640_glue_setkey); 221 222 int cryptd_morus640_glue_setauthsize(struct crypto_aead *aead, 223 unsigned int authsize) 224 { 225 struct cryptd_aead **ctx = crypto_aead_ctx(aead); 226 struct cryptd_aead *cryptd_tfm = *ctx; 227 228 return crypto_aead_setauthsize(&cryptd_tfm->base, authsize); 229 } 230 EXPORT_SYMBOL_GPL(cryptd_morus640_glue_setauthsize); 231 232 int cryptd_morus640_glue_encrypt(struct aead_request *req) 233 { 234 struct crypto_aead *aead = crypto_aead_reqtfm(req); 235 struct cryptd_aead **ctx = crypto_aead_ctx(aead); 236 struct cryptd_aead *cryptd_tfm = *ctx; 237 238 aead = &cryptd_tfm->base; > 239 if (irq_fpu_usable() && (!in_atomic() || 240 !cryptd_aead_queued(cryptd_tfm))) 241 aead = cryptd_aead_child(cryptd_tfm); 242 243 aead_request_set_tfm(req, aead); 244 245 return crypto_aead_encrypt(req); 246 } 247 EXPORT_SYMBOL_GPL(cryptd_morus640_glue_encrypt); 248 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip