public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* include/crypto/chacha.h:78: undefined reference to `chacha_init_arch'
@ 2020-11-04 15:50 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-11-04 15:50 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 7234 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4ef8451b332662d004df269d4cdeb7d9f31419b5
commit: e7096c131e5161fa3b8e52a650d7719d2857adfd net: WireGuard secure network tunnel
date:   11 months ago
config: arm-randconfig-r031-20201104 (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
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e7096c131e5161fa3b8e52a650d7719d2857adfd
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e7096c131e5161fa3b8e52a650d7719d2857adfd
        # 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@intel.com>

All errors (new ones prefixed by >>):

   arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_init':
>> include/crypto/chacha.h:78: undefined reference to `chacha_init_arch'
   arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `hchacha_block':
>> include/crypto/chacha.h:49: undefined reference to `hchacha_block_arch'
   arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_init':
>> include/crypto/chacha.h:78: undefined reference to `chacha_init_arch'
   arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_crypt':
>> include/crypto/chacha.h:92: undefined reference to `chacha_crypt_arch'
>> arm-linux-gnueabi-ld: include/crypto/chacha.h:92: undefined reference to `chacha_crypt_arch'
   arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_init':
>> include/crypto/chacha.h:78: undefined reference to `chacha_init_arch'
   arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_crypt':
>> include/crypto/chacha.h:92: undefined reference to `chacha_crypt_arch'
>> arm-linux-gnueabi-ld: include/crypto/chacha.h:92: undefined reference to `chacha_crypt_arch'
   arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_init':
>> include/crypto/chacha.h:78: undefined reference to `chacha_init_arch'
>> arm-linux-gnueabi-ld: include/crypto/chacha.h:78: undefined reference to `chacha_init_arch'
   arm-linux-gnueabi-ld: lib/crypto/chacha20poly1305.o: in function `chacha_crypt':
>> include/crypto/chacha.h:92: undefined reference to `chacha_crypt_arch'
>> arm-linux-gnueabi-ld: include/crypto/chacha.h:92: undefined reference to `chacha_crypt_arch'
>> arm-linux-gnueabi-ld: include/crypto/chacha.h:92: undefined reference to `chacha_crypt_arch'

vim +78 include/crypto/chacha.h

5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  45  
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  46  static inline void hchacha_block(const u32 *state, u32 *out, int nrounds)
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  47  {
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  48  	if (IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA))
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08 @49  		hchacha_block_arch(state, out, nrounds);
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  50  	else
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  51  		hchacha_block_generic(state, out, nrounds);
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  52  }
1ca1b917940c24 Eric Biggers   2018-11-16  53  
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  54  void chacha_init_arch(u32 *state, const u32 *key, const u8 *iv);
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  55  static inline void chacha_init_generic(u32 *state, const u32 *key, const u8 *iv)
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  56  {
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  57  	state[0]  = 0x61707865; /* "expa" */
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  58  	state[1]  = 0x3320646e; /* "nd 3" */
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  59  	state[2]  = 0x79622d32; /* "2-by" */
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  60  	state[3]  = 0x6b206574; /* "te k" */
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  61  	state[4]  = key[0];
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  62  	state[5]  = key[1];
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  63  	state[6]  = key[2];
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  64  	state[7]  = key[3];
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  65  	state[8]  = key[4];
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  66  	state[9]  = key[5];
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  67  	state[10] = key[6];
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  68  	state[11] = key[7];
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  69  	state[12] = get_unaligned_le32(iv +  0);
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  70  	state[13] = get_unaligned_le32(iv +  4);
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  71  	state[14] = get_unaligned_le32(iv +  8);
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  72  	state[15] = get_unaligned_le32(iv + 12);
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  73  }
1ca1b917940c24 Eric Biggers   2018-11-16  74  
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  75  static inline void chacha_init(u32 *state, const u32 *key, const u8 *iv)
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  76  {
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  77  	if (IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA))
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08 @78  		chacha_init_arch(state, key, iv);
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  79  	else
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  80  		chacha_init_generic(state, key, iv);
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  81  }
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  82  
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  83  void chacha_crypt_arch(u32 *state, u8 *dst, const u8 *src,
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  84  		       unsigned int bytes, int nrounds);
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  85  void chacha_crypt_generic(u32 *state, u8 *dst, const u8 *src,
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  86  			  unsigned int bytes, int nrounds);
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  87  
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  88  static inline void chacha_crypt(u32 *state, u8 *dst, const u8 *src,
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  89  				unsigned int bytes, int nrounds)
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  90  {
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  91  	if (IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA))
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08 @92  		chacha_crypt_arch(state, dst, src, bytes, nrounds);
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  93  	else
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  94  		chacha_crypt_generic(state, dst, src, bytes, nrounds);
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  95  }
5fb8ef25803ef3 Ard Biesheuvel 2019-11-08  96  

:::::: The code at line 78 was first introduced by commit
:::::: 5fb8ef25803ef33e2eb60b626435828b937bed75 crypto: chacha - move existing library code into lib/crypto

:::::: TO: Ard Biesheuvel <ardb@kernel.org>
:::::: CC: Herbert Xu <herbert@gondor.apana.org.au>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38028 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-04 15:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-04 15:50 include/crypto/chacha.h:78: undefined reference to `chacha_init_arch' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox