[cryptodev:master 2/46] arch/arm/crypto/curve25519-glue.c:73:12: error: implicit declaration of function 'sg_copy_to_buffer'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
head:   bbb2832620ac4e136416aa97af7310636422dea9
commit: 0c3dc787a62aef3ca7aedf3797ec42fff9b0a913 [2/46] crypto: algapi - Remove skbuff.h inclusion
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 0c3dc787a62aef3ca7aedf3797ec42fff9b0a913
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

Note: the cryptodev/master HEAD bbb2832620ac4e136416aa97af7310636422dea9 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   arch/arm/crypto/curve25519-glue.c: In function 'curve25519_compute_value':
>> arch/arm/crypto/curve25519-glue.c:73:12: error: implicit declaration of function 'sg_copy_to_buffer' [-Werror=implicit-function-declaration]
      73 |   copied = sg_copy_to_buffer(req->src,
         |            ^~~~~~~~~~~~~~~~~
>> arch/arm/crypto/curve25519-glue.c:74:9: error: implicit declaration of function 'sg_nents_for_len' [-Werror=implicit-function-declaration]
      74 |         sg_nents_for_len(req->src,
         |         ^~~~~~~~~~~~~~~~
>> arch/arm/crypto/curve25519-glue.c:88:11: error: implicit declaration of function 'sg_copy_from_buffer' [-Werror=implicit-function-declaration]
      88 |  copied = sg_copy_from_buffer(req->dst, sg_nents_for_len(req->dst,
         |           ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/crypto/stm32/stm32-crc32.c: In function 'stm32_crc_init':
>> drivers/crypto/stm32/stm32-crc32.c:128:2: error: implicit declaration of function 'writel_relaxed' [-Werror=implicit-function-declaration]
     128 |  writel_relaxed(bitrev32(mctx->key), crc->regs + CRC_INIT);
         |  ^~~~~~~~~~~~~~
>> drivers/crypto/stm32/stm32-crc32.c:134:17: error: implicit declaration of function 'readl_relaxed' [-Werror=implicit-function-declaration]
     134 |  ctx->partial = readl_relaxed(crc->regs + CRC_DR);
         |                 ^~~~~~~~~~~~~
   drivers/crypto/stm32/stm32-crc32.c: In function 'burst_update':
>> drivers/crypto/stm32/stm32-crc32.c:176:4: error: implicit declaration of function 'writeb_relaxed' [-Werror=implicit-function-declaration]
     176 |    writeb_relaxed(*d8++, crc->regs + CRC_DR);
         |    ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/crypto/stm32/stm32-hash.c: In function 'stm32_hash_hmac_dma_send':
>> drivers/crypto/stm32/stm32-hash.c:492:18: error: implicit declaration of function 'dma_map_sg'; did you mean 'dma_cap_set'? [-Werror=implicit-function-declaration]
     492 |   rctx->dma_ct = dma_map_sg(hdev->dev, &rctx->sg_key, 1,
         |                  ^~~~~~~~~~
         |                  dma_cap_set
>> drivers/crypto/stm32/stm32-hash.c:493:8: error: 'DMA_TO_DEVICE' undeclared (first use in this function); did you mean 'MT_DEVICE'?
     493 |        DMA_TO_DEVICE);
         |        ^~~~~~~~~~~~~
         |        MT_DEVICE
   drivers/crypto/stm32/stm32-hash.c:493:8: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/crypto/stm32/stm32-hash.c:501:3: error: implicit declaration of function 'dma_unmap_sg' [-Werror=implicit-function-declaration]
     501 |   dma_unmap_sg(hdev->dev, &rctx->sg_key, 1, DMA_TO_DEVICE);
         |   ^~~~~~~~~~~~
   drivers/crypto/stm32/stm32-hash.c: In function 'stm32_hash_dma_send':
   drivers/crypto/stm32/stm32-hash.c:589:8: error: 'DMA_TO_DEVICE' undeclared (first use in this function); did you mean 'MT_DEVICE'?
     589 |        DMA_TO_DEVICE);
         |        ^~~~~~~~~~~~~
         |        MT_DEVICE
   cc1: some warnings being treated as errors

# https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git/commit/?id=0c3dc787a62aef3ca7aedf3797ec42fff9b0a913
git remote add cryptodev https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
git fetch --no-tags cryptodev master
git checkout 0c3dc787a62aef3ca7aedf3797ec42fff9b0a913
vim +/sg_copy_to_buffer +73 arch/arm/crypto/curve25519-glue.c

d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  62  
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  63  static int curve25519_compute_value(struct kpp_request *req)
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  64  {
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  65  	struct crypto_kpp *tfm = crypto_kpp_reqtfm(req);
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  66  	const u8 *secret = kpp_tfm_ctx(tfm);
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  67  	u8 public_key[CURVE25519_KEY_SIZE];
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  68  	u8 buf[CURVE25519_KEY_SIZE];
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  69  	int copied, nbytes;
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  70  	u8 const *bp;
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  71  
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  72  	if (req->src) {
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08 @73  		copied = sg_copy_to_buffer(req->src,
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08 @74  					   sg_nents_for_len(req->src,
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  75  							    CURVE25519_KEY_SIZE),
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  76  					   public_key, CURVE25519_KEY_SIZE);
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  77  		if (copied != CURVE25519_KEY_SIZE)
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  78  			return -EINVAL;
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  79  		bp = public_key;
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  80  	} else {
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  81  		bp = curve25519_base_point;
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  82  	}
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  83  
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  84  	curve25519_arch(buf, secret, bp);
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  85  
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  86  	/* might want less than we've got */
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  87  	nbytes = min_t(size_t, CURVE25519_KEY_SIZE, req->dst_len);
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08 @88  	copied = sg_copy_from_buffer(req->dst, sg_nents_for_len(req->dst,
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  89  								nbytes),
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  90  				     buf, nbytes);
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  91  	if (copied != nbytes)
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  92  		return -EINVAL;
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  93  	return 0;
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  94  }
d8f1308a025fc7 Jason A. Donenfeld 2019-11-08  95  

:::::: The code at line 73 was first introduced by commit
:::::: d8f1308a025fc7e00414194ed742d5f05a21e13c crypto: arm/curve25519 - wire up NEON implementation

:::::: TO: Jason A. Donenfeld <Jason@xxxxxxxxx>
:::::: CC: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux