lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202011042312.Yk9oo4eX-lkp@intel.com>
Date:   Wed, 4 Nov 2020 23:50:18 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Jason A. Donenfeld" <zx2c4@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: include/crypto/chacha.h:78: undefined reference to `chacha_init_arch'

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@...el.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@...nel.org>
:::::: CC: Herbert Xu <herbert@...dor.apana.org.au>

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

Download attachment ".config.gz" of type "application/gzip" (38028 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ