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]
Date:   Wed, 2 Feb 2022 19:17:24 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ard Biesheuvel <ardb@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Eric Biggers <ebiggers@...gle.com>
Subject: [ebiggers:crypto-pending 11/11] arch/arm64/crypto/aes-glue.c:479:34:
 error: 'STRIDE' undeclared

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git crypto-pending
head:   33ee40d3677bee91888ba1a6ee5a37bd6d2292fe
commit: 33ee40d3677bee91888ba1a6ee5a37bd6d2292fe [11/11] crypto: arm64/aes-neon-ctr - improve handling of single tail block
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220202/202202021920.Z3GsGWlW-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.2.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/ebiggers/linux.git/commit/?id=33ee40d3677bee91888ba1a6ee5a37bd6d2292fe
        git remote add ebiggers https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git
        git fetch --no-tags ebiggers crypto-pending
        git checkout 33ee40d3677bee91888ba1a6ee5a37bd6d2292fe
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash

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 >>):

   arch/arm64/crypto/aes-glue.c: In function 'xctr_encrypt':
>> arch/arm64/crypto/aes-glue.c:479:34: error: 'STRIDE' undeclared (first use in this function)
     479 |                 tail = nbytes % (STRIDE * AES_BLOCK_SIZE);
         |                                  ^~~~~~
   arch/arm64/crypto/aes-glue.c:479:34: note: each undeclared identifier is reported only once for each function it appears in


vim +/STRIDE +479 arch/arm64/crypto/aes-glue.c

735177ca148af50 Ard Biesheuvel     2019-08-19  451  
9d5a9509b912217 Nathan Huckleberry 2022-01-24  452  static int __maybe_unused xctr_encrypt(struct skcipher_request *req)
9d5a9509b912217 Nathan Huckleberry 2022-01-24  453  {
9d5a9509b912217 Nathan Huckleberry 2022-01-24  454  	struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
9d5a9509b912217 Nathan Huckleberry 2022-01-24  455  	struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm);
9d5a9509b912217 Nathan Huckleberry 2022-01-24  456  	int err, rounds = 6 + ctx->key_length / 4;
9d5a9509b912217 Nathan Huckleberry 2022-01-24  457  	struct skcipher_walk walk;
9d5a9509b912217 Nathan Huckleberry 2022-01-24  458  	unsigned int byte_ctr = 0;
9d5a9509b912217 Nathan Huckleberry 2022-01-24  459  
9d5a9509b912217 Nathan Huckleberry 2022-01-24  460  	err = skcipher_walk_virt(&walk, req, false);
9d5a9509b912217 Nathan Huckleberry 2022-01-24  461  
9d5a9509b912217 Nathan Huckleberry 2022-01-24  462  	while (walk.nbytes > 0) {
9d5a9509b912217 Nathan Huckleberry 2022-01-24  463  		const u8 *src = walk.src.virt.addr;
9d5a9509b912217 Nathan Huckleberry 2022-01-24  464  		unsigned int nbytes = walk.nbytes;
9d5a9509b912217 Nathan Huckleberry 2022-01-24  465  		u8 *dst = walk.dst.virt.addr;
9d5a9509b912217 Nathan Huckleberry 2022-01-24  466  		u8 buf[AES_BLOCK_SIZE];
9d5a9509b912217 Nathan Huckleberry 2022-01-24  467  		unsigned int tail;
9d5a9509b912217 Nathan Huckleberry 2022-01-24  468  
9d5a9509b912217 Nathan Huckleberry 2022-01-24  469  		if (unlikely(nbytes < AES_BLOCK_SIZE))
9d5a9509b912217 Nathan Huckleberry 2022-01-24  470  			src = memcpy(buf, src, nbytes);
9d5a9509b912217 Nathan Huckleberry 2022-01-24  471  		else if (nbytes < walk.total)
9d5a9509b912217 Nathan Huckleberry 2022-01-24  472  			nbytes &= ~(AES_BLOCK_SIZE - 1);
9d5a9509b912217 Nathan Huckleberry 2022-01-24  473  
9d5a9509b912217 Nathan Huckleberry 2022-01-24  474  		kernel_neon_begin();
9d5a9509b912217 Nathan Huckleberry 2022-01-24  475  		aes_xctr_encrypt(dst, src, ctx->key_enc, rounds, nbytes,
9d5a9509b912217 Nathan Huckleberry 2022-01-24  476  						 walk.iv, buf, byte_ctr);
9d5a9509b912217 Nathan Huckleberry 2022-01-24  477  		kernel_neon_end();
9d5a9509b912217 Nathan Huckleberry 2022-01-24  478  
9d5a9509b912217 Nathan Huckleberry 2022-01-24 @479  		tail = nbytes % (STRIDE * AES_BLOCK_SIZE);
9d5a9509b912217 Nathan Huckleberry 2022-01-24  480  		if (tail > 0 && tail < AES_BLOCK_SIZE)
9d5a9509b912217 Nathan Huckleberry 2022-01-24  481  			/*
9d5a9509b912217 Nathan Huckleberry 2022-01-24  482  			 * The final partial block could not be returned using
9d5a9509b912217 Nathan Huckleberry 2022-01-24  483  			 * an overlapping store, so it was passed via buf[]
9d5a9509b912217 Nathan Huckleberry 2022-01-24  484  			 * instead.
9d5a9509b912217 Nathan Huckleberry 2022-01-24  485  			 */
9d5a9509b912217 Nathan Huckleberry 2022-01-24  486  			memcpy(dst + nbytes - tail, buf, tail);
9d5a9509b912217 Nathan Huckleberry 2022-01-24  487  		byte_ctr += nbytes;
9d5a9509b912217 Nathan Huckleberry 2022-01-24  488  
9d5a9509b912217 Nathan Huckleberry 2022-01-24  489  		err = skcipher_walk_done(&walk, walk.nbytes - nbytes);
9d5a9509b912217 Nathan Huckleberry 2022-01-24  490  	}
9d5a9509b912217 Nathan Huckleberry 2022-01-24  491  
9d5a9509b912217 Nathan Huckleberry 2022-01-24  492  	return err;
9d5a9509b912217 Nathan Huckleberry 2022-01-24  493  }
9d5a9509b912217 Nathan Huckleberry 2022-01-24  494  

:::::: The code at line 479 was first introduced by commit
:::::: 9d5a9509b912217aa41fd8ca8c5d3c125ecc3ca2 crypto: arm64/aes-xctr: Add accelerated implementation of XCTR

:::::: TO: Nathan Huckleberry <nhuck@...gle.com>
:::::: CC: Eric Biggers <ebiggers@...gle.com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ