* [cryptodev:master 4/17] arch/arm64/crypto/chacha20-neon-glue.c:66:32: error: passing argument 1 of 'crypto_chacha20_crypt' from incompatible pointer type
@ 2016-12-27 12:27 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2016-12-27 12:27 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: kbuild-all, linux-crypto, Herbert Xu
[-- Attachment #1: Type: text/plain, Size: 6294 bytes --]
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: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gnu-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=arm64
All errors (new ones prefixed by >>):
arch/arm64/crypto/chacha20-neon-glue.c: In function 'chacha20_simd':
>> arch/arm64/crypto/chacha20-neon-glue.c:66: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/arm64/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/arm64/crypto/chacha20-neon-glue.c:66:10: error: too many arguments to function 'crypto_chacha20_crypt'
return crypto_chacha20_crypt(desc, dst, src, nbytes);
^~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/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/arm64/crypto/chacha20-neon-glue.c: At top level:
>> arch/arm64/crypto/chacha20-neon-glue.c:109:15: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.setkey = crypto_chacha20_setkey,
^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/crypto/chacha20-neon-glue.c:109:15: note: (near initialization for 'alg.cra_u.blkcipher.setkey')
cc1: some warnings being treated as errors
vim +/crypto_chacha20_crypt +66 arch/arm64/crypto/chacha20-neon-glue.c
8621caa0 Ard Biesheuvel 2016-12-08 60 {
8621caa0 Ard Biesheuvel 2016-12-08 61 struct blkcipher_walk walk;
8621caa0 Ard Biesheuvel 2016-12-08 62 u32 state[16];
8621caa0 Ard Biesheuvel 2016-12-08 63 int err;
8621caa0 Ard Biesheuvel 2016-12-08 64
8621caa0 Ard Biesheuvel 2016-12-08 65 if (nbytes <= CHACHA20_BLOCK_SIZE)
8621caa0 Ard Biesheuvel 2016-12-08 @66 return crypto_chacha20_crypt(desc, dst, src, nbytes);
8621caa0 Ard Biesheuvel 2016-12-08 67
8621caa0 Ard Biesheuvel 2016-12-08 68 blkcipher_walk_init(&walk, dst, src, nbytes);
8621caa0 Ard Biesheuvel 2016-12-08 69 err = blkcipher_walk_virt_block(desc, &walk, CHACHA20_BLOCK_SIZE);
8621caa0 Ard Biesheuvel 2016-12-08 70
8621caa0 Ard Biesheuvel 2016-12-08 71 crypto_chacha20_init(state, crypto_blkcipher_ctx(desc->tfm), walk.iv);
8621caa0 Ard Biesheuvel 2016-12-08 72
8621caa0 Ard Biesheuvel 2016-12-08 73 kernel_neon_begin();
8621caa0 Ard Biesheuvel 2016-12-08 74
8621caa0 Ard Biesheuvel 2016-12-08 75 while (walk.nbytes >= CHACHA20_BLOCK_SIZE) {
8621caa0 Ard Biesheuvel 2016-12-08 76 chacha20_dosimd(state, walk.dst.virt.addr, walk.src.virt.addr,
8621caa0 Ard Biesheuvel 2016-12-08 77 rounddown(walk.nbytes, CHACHA20_BLOCK_SIZE));
8621caa0 Ard Biesheuvel 2016-12-08 78 err = blkcipher_walk_done(desc, &walk,
8621caa0 Ard Biesheuvel 2016-12-08 79 walk.nbytes % CHACHA20_BLOCK_SIZE);
8621caa0 Ard Biesheuvel 2016-12-08 80 }
8621caa0 Ard Biesheuvel 2016-12-08 81
8621caa0 Ard Biesheuvel 2016-12-08 82 if (walk.nbytes) {
8621caa0 Ard Biesheuvel 2016-12-08 83 chacha20_dosimd(state, walk.dst.virt.addr, walk.src.virt.addr,
8621caa0 Ard Biesheuvel 2016-12-08 84 walk.nbytes);
8621caa0 Ard Biesheuvel 2016-12-08 85 err = blkcipher_walk_done(desc, &walk, 0);
8621caa0 Ard Biesheuvel 2016-12-08 86 }
8621caa0 Ard Biesheuvel 2016-12-08 87
8621caa0 Ard Biesheuvel 2016-12-08 88 kernel_neon_end();
8621caa0 Ard Biesheuvel 2016-12-08 89
8621caa0 Ard Biesheuvel 2016-12-08 90 return err;
8621caa0 Ard Biesheuvel 2016-12-08 91 }
8621caa0 Ard Biesheuvel 2016-12-08 92
8621caa0 Ard Biesheuvel 2016-12-08 93 static struct crypto_alg alg = {
8621caa0 Ard Biesheuvel 2016-12-08 94 .cra_name = "chacha20",
8621caa0 Ard Biesheuvel 2016-12-08 95 .cra_driver_name = "chacha20-neon",
8621caa0 Ard Biesheuvel 2016-12-08 96 .cra_priority = 300,
8621caa0 Ard Biesheuvel 2016-12-08 97 .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
8621caa0 Ard Biesheuvel 2016-12-08 98 .cra_blocksize = 1,
8621caa0 Ard Biesheuvel 2016-12-08 99 .cra_type = &crypto_blkcipher_type,
8621caa0 Ard Biesheuvel 2016-12-08 100 .cra_ctxsize = sizeof(struct chacha20_ctx),
8621caa0 Ard Biesheuvel 2016-12-08 101 .cra_alignmask = sizeof(u32) - 1,
8621caa0 Ard Biesheuvel 2016-12-08 102 .cra_module = THIS_MODULE,
8621caa0 Ard Biesheuvel 2016-12-08 103 .cra_u = {
8621caa0 Ard Biesheuvel 2016-12-08 104 .blkcipher = {
8621caa0 Ard Biesheuvel 2016-12-08 105 .min_keysize = CHACHA20_KEY_SIZE,
8621caa0 Ard Biesheuvel 2016-12-08 106 .max_keysize = CHACHA20_KEY_SIZE,
8621caa0 Ard Biesheuvel 2016-12-08 107 .ivsize = CHACHA20_IV_SIZE,
8621caa0 Ard Biesheuvel 2016-12-08 108 .geniv = "seqiv",
8621caa0 Ard Biesheuvel 2016-12-08 @109 .setkey = crypto_chacha20_setkey,
8621caa0 Ard Biesheuvel 2016-12-08 110 .encrypt = chacha20_simd,
8621caa0 Ard Biesheuvel 2016-12-08 111 .decrypt = chacha20_simd,
8621caa0 Ard Biesheuvel 2016-12-08 112 },
:::::: The code at line 66 was first introduced by commit
:::::: 8621caa0d45e731f2e9f5889ff5bb384fcd6e059 crypto: arm64/chacha20 - implement NEON version based on SSE3 code
:::::: TO: Ard Biesheuvel <ard.biesheuvel@linaro.org>
:::::: CC: Herbert Xu <herbert@gondor.apana.org.au>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53488 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-12-27 12:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-27 12:27 [cryptodev:master 4/17] arch/arm64/crypto/chacha20-neon-glue.c:66:32: error: passing argument 1 of 'crypto_chacha20_crypt' from incompatible pointer type kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).