tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: fb91a661d99f460f2ea4c7f23ed47f56863ca1d1 commit: 9ae433bc79f97bae221d53bb1a8e21415ea58625 [4/17] crypto: chacha20 - convert generic and x86 versions to skcipher config: arm-allmodconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 9ae433bc79f97bae221d53bb1a8e21415ea58625 # save the attached .config to linux build tree make.cross ARCH=arm All errors (new ones prefixed by >>): arch/arm/crypto/chacha20-neon-glue.c: In function 'chacha20_simd': >> arch/arm/crypto/chacha20-neon-glue.c:68:32: error: passing argument 1 of 'crypto_chacha20_crypt' from incompatible pointer type [-Werror=incompatible-pointer-types] return crypto_chacha20_crypt(desc, dst, src, nbytes); ^~~~ In file included from arch/arm/crypto/chacha20-neon-glue.c:22:0: include/crypto/chacha20.h:24:5: note: expected 'struct skcipher_request *' but argument is of type 'struct blkcipher_desc *' int crypto_chacha20_crypt(struct skcipher_request *req); ^~~~~~~~~~~~~~~~~~~~~ >> arch/arm/crypto/chacha20-neon-glue.c:68:10: error: too many arguments to function 'crypto_chacha20_crypt' return crypto_chacha20_crypt(desc, dst, src, nbytes); ^~~~~~~~~~~~~~~~~~~~~ In file included from arch/arm/crypto/chacha20-neon-glue.c:22:0: include/crypto/chacha20.h:24:5: note: declared here int crypto_chacha20_crypt(struct skcipher_request *req); ^~~~~~~~~~~~~~~~~~~~~ arch/arm/crypto/chacha20-neon-glue.c: At top level: >> arch/arm/crypto/chacha20-neon-glue.c:111:15: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .setkey = crypto_chacha20_setkey, ^~~~~~~~~~~~~~~~~~~~~~ arch/arm/crypto/chacha20-neon-glue.c:111:15: note: (near initialization for 'alg.cra_u.blkcipher.setkey') cc1: some warnings being treated as errors vim +/crypto_chacha20_crypt +68 arch/arm/crypto/chacha20-neon-glue.c 80966672 Ard Biesheuvel 2016-12-08 62 { 80966672 Ard Biesheuvel 2016-12-08 63 struct blkcipher_walk walk; 80966672 Ard Biesheuvel 2016-12-08 64 u32 state[16]; 80966672 Ard Biesheuvel 2016-12-08 65 int err; 80966672 Ard Biesheuvel 2016-12-08 66 80966672 Ard Biesheuvel 2016-12-08 67 if (nbytes <= CHACHA20_BLOCK_SIZE || !may_use_simd()) 80966672 Ard Biesheuvel 2016-12-08 @68 return crypto_chacha20_crypt(desc, dst, src, nbytes); 80966672 Ard Biesheuvel 2016-12-08 69 80966672 Ard Biesheuvel 2016-12-08 70 blkcipher_walk_init(&walk, dst, src, nbytes); 80966672 Ard Biesheuvel 2016-12-08 71 err = blkcipher_walk_virt_block(desc, &walk, CHACHA20_BLOCK_SIZE); 80966672 Ard Biesheuvel 2016-12-08 72 80966672 Ard Biesheuvel 2016-12-08 73 crypto_chacha20_init(state, crypto_blkcipher_ctx(desc->tfm), walk.iv); 80966672 Ard Biesheuvel 2016-12-08 74 80966672 Ard Biesheuvel 2016-12-08 75 kernel_neon_begin(); 80966672 Ard Biesheuvel 2016-12-08 76 80966672 Ard Biesheuvel 2016-12-08 77 while (walk.nbytes >= CHACHA20_BLOCK_SIZE) { 80966672 Ard Biesheuvel 2016-12-08 78 chacha20_dosimd(state, walk.dst.virt.addr, walk.src.virt.addr, 80966672 Ard Biesheuvel 2016-12-08 79 rounddown(walk.nbytes, CHACHA20_BLOCK_SIZE)); 80966672 Ard Biesheuvel 2016-12-08 80 err = blkcipher_walk_done(desc, &walk, 80966672 Ard Biesheuvel 2016-12-08 81 walk.nbytes % CHACHA20_BLOCK_SIZE); 80966672 Ard Biesheuvel 2016-12-08 82 } 80966672 Ard Biesheuvel 2016-12-08 83 80966672 Ard Biesheuvel 2016-12-08 84 if (walk.nbytes) { 80966672 Ard Biesheuvel 2016-12-08 85 chacha20_dosimd(state, walk.dst.virt.addr, walk.src.virt.addr, 80966672 Ard Biesheuvel 2016-12-08 86 walk.nbytes); 80966672 Ard Biesheuvel 2016-12-08 87 err = blkcipher_walk_done(desc, &walk, 0); 80966672 Ard Biesheuvel 2016-12-08 88 } 80966672 Ard Biesheuvel 2016-12-08 89 80966672 Ard Biesheuvel 2016-12-08 90 kernel_neon_end(); 80966672 Ard Biesheuvel 2016-12-08 91 80966672 Ard Biesheuvel 2016-12-08 92 return err; 80966672 Ard Biesheuvel 2016-12-08 93 } 80966672 Ard Biesheuvel 2016-12-08 94 80966672 Ard Biesheuvel 2016-12-08 95 static struct crypto_alg alg = { 80966672 Ard Biesheuvel 2016-12-08 96 .cra_name = "chacha20", 80966672 Ard Biesheuvel 2016-12-08 97 .cra_driver_name = "chacha20-neon", 80966672 Ard Biesheuvel 2016-12-08 98 .cra_priority = 300, 80966672 Ard Biesheuvel 2016-12-08 99 .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, 80966672 Ard Biesheuvel 2016-12-08 100 .cra_blocksize = 1, 80966672 Ard Biesheuvel 2016-12-08 101 .cra_type = &crypto_blkcipher_type, 80966672 Ard Biesheuvel 2016-12-08 102 .cra_ctxsize = sizeof(struct chacha20_ctx), 80966672 Ard Biesheuvel 2016-12-08 103 .cra_alignmask = sizeof(u32) - 1, 80966672 Ard Biesheuvel 2016-12-08 104 .cra_module = THIS_MODULE, 80966672 Ard Biesheuvel 2016-12-08 105 .cra_u = { 80966672 Ard Biesheuvel 2016-12-08 106 .blkcipher = { 80966672 Ard Biesheuvel 2016-12-08 107 .min_keysize = CHACHA20_KEY_SIZE, 80966672 Ard Biesheuvel 2016-12-08 108 .max_keysize = CHACHA20_KEY_SIZE, 80966672 Ard Biesheuvel 2016-12-08 109 .ivsize = CHACHA20_IV_SIZE, 80966672 Ard Biesheuvel 2016-12-08 110 .geniv = "seqiv", 80966672 Ard Biesheuvel 2016-12-08 @111 .setkey = crypto_chacha20_setkey, 80966672 Ard Biesheuvel 2016-12-08 112 .encrypt = chacha20_simd, 80966672 Ard Biesheuvel 2016-12-08 113 .decrypt = chacha20_simd, 80966672 Ard Biesheuvel 2016-12-08 114 }, :::::: The code at line 68 was first introduced by commit :::::: 8096667273477e735b0072b11a6d617ccee45e5f crypto: arm/chacha20 - implement NEON version based on SSE3 code :::::: TO: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx> :::::: CC: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip