All of lore.kernel.org
 help / color / mirror / Atom feed
* [ardb:hctr2 3/8] crypto/hctr2.c:115:38: sparse: sparse: incorrect type in assignment (different base types)
@ 2022-02-08 22:29 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-02-08 22:29 UTC (permalink / raw)
  To: Nathan Huckleberry; +Cc: kbuild-all, linux-kernel, Ard Biesheuvel

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git hctr2
head:   5bb01649223080b7cde5740f441eb5e758ec357f
commit: 09533ad0ea8fa56420aa6e866b11c0685e862bd1 [3/8] crypto: hctr2 - Add HCTR2 support
config: sparc64-randconfig-s032-20220208 (https://download.01.org/0day-ci/archive/20220209/202202090607.wkQ2yto6-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?id=09533ad0ea8fa56420aa6e866b11c0685e862bd1
        git remote add ardb git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
        git fetch --no-tags ardb hctr2
        git checkout 09533ad0ea8fa56420aa6e866b11c0685e862bd1
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc64 SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> crypto/hctr2.c:115:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long @@     got restricted __le64 [usertype] @@
   crypto/hctr2.c:115:38: sparse:     expected unsigned long long
   crypto/hctr2.c:115:38: sparse:     got restricted __le64 [usertype]
   crypto/hctr2.c:117:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long @@     got restricted __le64 [usertype] @@
   crypto/hctr2.c:117:38: sparse:     expected unsigned long long
   crypto/hctr2.c:117:38: sparse:     got restricted __le64 [usertype]

vim +115 crypto/hctr2.c

   103	
   104	static int hctr2_hash_tweak(struct skcipher_request *req, u8 *iv)
   105	{
   106		u64 tweak_length_part[2];
   107		struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
   108		const struct hctr2_tfm_ctx *tctx = crypto_skcipher_ctx(tfm);
   109		struct hctr2_request_ctx *rctx = skcipher_request_ctx(req);
   110		struct shash_desc *hash_desc = &rctx->u.hash_desc;
   111		int err;
   112	
   113		memset(tweak_length_part, 0, sizeof(tweak_length_part));
   114		if (req->cryptlen % POLYVAL_BLOCK_SIZE == 0)
 > 115			tweak_length_part[0] = cpu_to_le64(TWEAK_SIZE * 8 * 2 + 2);
   116		else
   117			tweak_length_part[0] = cpu_to_le64(TWEAK_SIZE * 8 * 2 + 3);
   118	
   119		hash_desc->tfm = tctx->hash;
   120		err = crypto_shash_init(hash_desc);
   121		if (err)
   122			return err;
   123	
   124		err = crypto_shash_update(hash_desc, (u8 *)tweak_length_part, sizeof(tweak_length_part));
   125		if (err)
   126			return err;
   127		err = crypto_shash_update(hash_desc, iv, TWEAK_SIZE);
   128		return err;
   129	}
   130	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ardb:hctr2 3/8] crypto/hctr2.c:115:38: sparse: sparse: incorrect type in assignment (different base types)
@ 2022-02-08 22:29 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-02-08 22:29 UTC (permalink / raw)
  To: kbuild-all

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

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git hctr2
head:   5bb01649223080b7cde5740f441eb5e758ec357f
commit: 09533ad0ea8fa56420aa6e866b11c0685e862bd1 [3/8] crypto: hctr2 - Add HCTR2 support
config: sparc64-randconfig-s032-20220208 (https://download.01.org/0day-ci/archive/20220209/202202090607.wkQ2yto6-lkp(a)intel.com/config)
compiler: sparc64-linux-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?id=09533ad0ea8fa56420aa6e866b11c0685e862bd1
        git remote add ardb git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
        git fetch --no-tags ardb hctr2
        git checkout 09533ad0ea8fa56420aa6e866b11c0685e862bd1
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc64 SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> crypto/hctr2.c:115:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long @@     got restricted __le64 [usertype] @@
   crypto/hctr2.c:115:38: sparse:     expected unsigned long long
   crypto/hctr2.c:115:38: sparse:     got restricted __le64 [usertype]
   crypto/hctr2.c:117:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long @@     got restricted __le64 [usertype] @@
   crypto/hctr2.c:117:38: sparse:     expected unsigned long long
   crypto/hctr2.c:117:38: sparse:     got restricted __le64 [usertype]

vim +115 crypto/hctr2.c

   103	
   104	static int hctr2_hash_tweak(struct skcipher_request *req, u8 *iv)
   105	{
   106		u64 tweak_length_part[2];
   107		struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
   108		const struct hctr2_tfm_ctx *tctx = crypto_skcipher_ctx(tfm);
   109		struct hctr2_request_ctx *rctx = skcipher_request_ctx(req);
   110		struct shash_desc *hash_desc = &rctx->u.hash_desc;
   111		int err;
   112	
   113		memset(tweak_length_part, 0, sizeof(tweak_length_part));
   114		if (req->cryptlen % POLYVAL_BLOCK_SIZE == 0)
 > 115			tweak_length_part[0] = cpu_to_le64(TWEAK_SIZE * 8 * 2 + 2);
   116		else
   117			tweak_length_part[0] = cpu_to_le64(TWEAK_SIZE * 8 * 2 + 3);
   118	
   119		hash_desc->tfm = tctx->hash;
   120		err = crypto_shash_init(hash_desc);
   121		if (err)
   122			return err;
   123	
   124		err = crypto_shash_update(hash_desc, (u8 *)tweak_length_part, sizeof(tweak_length_part));
   125		if (err)
   126			return err;
   127		err = crypto_shash_update(hash_desc, iv, TWEAK_SIZE);
   128		return err;
   129	}
   130	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-08 22:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 22:29 [ardb:hctr2 3/8] crypto/hctr2.c:115:38: sparse: sparse: incorrect type in assignment (different base types) kernel test robot
2022-02-08 22:29 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.