From: kernel test robot <lkp@intel.com>
To: Nathan Huckleberry <nhuck@google.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Ard Biesheuvel <ardb@kernel.org>
Subject: [ardb:hctr2 3/8] crypto/hctr2.c:115:38: sparse: sparse: incorrect type in assignment (different base types)
Date: Wed, 9 Feb 2022 06:29:42 +0800 [thread overview]
Message-ID: <202202090607.wkQ2yto6-lkp@intel.com> (raw)
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
reply other threads:[~2022-02-08 22:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202202090607.wkQ2yto6-lkp@intel.com \
--to=lkp@intel.com \
--cc=ardb@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nhuck@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®