All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v3 3/6] drivers: crypto: qce: skcipher: Fix regressions found during fuzz testing
Date: Thu, 21 Jan 2021 08:04:24 +0800	[thread overview]
Message-ID: <202101210725.kIB7M4Ei-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210120184843.3217775-4-thara.gopinath@linaro.org>
References: <20210120184843.3217775-4-thara.gopinath@linaro.org>
TO: Thara Gopinath <thara.gopinath@linaro.org>
TO: herbert(a)gondor.apana.org.au
TO: davem(a)davemloft.net
TO: bjorn.andersson(a)linaro.org
CC: ebiggers(a)google.com
CC: ardb(a)kernel.org
CC: sivaprak(a)codeaurora.org
CC: linux-crypto(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

Hi Thara,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on cryptodev/master]
[also build test WARNING on crypto/master v5.11-rc4 next-20210120]
[cannot apply to sparc-next/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Thara-Gopinath/Regression-fixes-clean-ups-in-the-Qualcomm-crypto-engine-driver/20210121-032302
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago
config: alpha-randconfig-s032-20210120 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.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.3-208-g46a52ca4-dirty
        # https://github.com/0day-ci/linux/commit/2eb9a0d7f44a35ca2528cb2af18c3550e7af6bc8
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Thara-Gopinath/Regression-fixes-clean-ups-in-the-Qualcomm-crypto-engine-driver/20210121-032302
        git checkout 2eb9a0d7f44a35ca2528cb2af18c3550e7af6bc8
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=alpha 

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 >>)"
>> drivers/crypto/qce/skcipher.c:239:58: sparse: sparse: dubious: !x | !y
   drivers/crypto/qce/skcipher.c:240:58: sparse: sparse: dubious: x | !y

vim +239 drivers/crypto/qce/skcipher.c

5feaaae1b549f351 drivers/crypto/qce/ablkcipher.c Herbert Xu     2019-04-11  218  
8bf0871539faa090 drivers/crypto/qce/skcipher.c   Ard Biesheuvel 2019-11-09  219  static int qce_des3_setkey(struct crypto_skcipher *ablk, const u8 *key,
f96c897c855cfbde drivers/crypto/qce/ablkcipher.c Ard Biesheuvel 2019-08-15  220  			   unsigned int keylen)
f96c897c855cfbde drivers/crypto/qce/ablkcipher.c Ard Biesheuvel 2019-08-15  221  {
8bf0871539faa090 drivers/crypto/qce/skcipher.c   Ard Biesheuvel 2019-11-09  222  	struct qce_cipher_ctx *ctx = crypto_skcipher_ctx(ablk);
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20  223  	u32 _key[6];
f96c897c855cfbde drivers/crypto/qce/ablkcipher.c Ard Biesheuvel 2019-08-15  224  	int err;
f96c897c855cfbde drivers/crypto/qce/ablkcipher.c Ard Biesheuvel 2019-08-15  225  
8bf0871539faa090 drivers/crypto/qce/skcipher.c   Ard Biesheuvel 2019-11-09  226  	err = verify_skcipher_des3_key(ablk, key);
f96c897c855cfbde drivers/crypto/qce/ablkcipher.c Ard Biesheuvel 2019-08-15  227  	if (err)
f96c897c855cfbde drivers/crypto/qce/ablkcipher.c Ard Biesheuvel 2019-08-15  228  		return err;
f96c897c855cfbde drivers/crypto/qce/ablkcipher.c Ard Biesheuvel 2019-08-15  229  
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20  230  	/*
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20  231  	 * The crypto engine does not support any two keys
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20  232  	 * being the same for triple des algorithms. The
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20  233  	 * verify_skcipher_des3_key does not check for all the
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20  234  	 * below conditions. Return -ENOKEY in case any two keys
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20  235  	 * are the same. Revisit to see if a fallback cipher
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20  236  	 * is needed to handle this condition.
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20  237  	 */
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20  238  	memcpy(_key, key, DES3_EDE_KEY_SIZE);
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20 @239  	if (!((_key[0] ^ _key[2]) | (_key[1] ^ _key[3])) |
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20  240  	    !((_key[2] ^ _key[4]) | (_key[3] ^ _key[5])) |
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20  241  	    !((_key[0] ^ _key[4]) | (_key[1] ^ _key[5])))
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20  242  		return -ENOKEY;
2eb9a0d7f44a35ca drivers/crypto/qce/skcipher.c   Thara Gopinath 2021-01-20  243  
5feaaae1b549f351 drivers/crypto/qce/ablkcipher.c Herbert Xu     2019-04-11  244  	ctx->enc_keylen = keylen;
5feaaae1b549f351 drivers/crypto/qce/ablkcipher.c Herbert Xu     2019-04-11  245  	memcpy(ctx->enc_key, key, keylen);
5feaaae1b549f351 drivers/crypto/qce/ablkcipher.c Herbert Xu     2019-04-11  246  	return 0;
5feaaae1b549f351 drivers/crypto/qce/ablkcipher.c Herbert Xu     2019-04-11  247  }
5feaaae1b549f351 drivers/crypto/qce/ablkcipher.c Herbert Xu     2019-04-11  248  

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

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

             reply	other threads:[~2021-01-21  0:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21  0:04 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-20 18:48 [PATCH v3 0/6] Regression fixes/clean ups in the Qualcomm crypto engine driver Thara Gopinath
2021-01-20 18:48 ` [PATCH v3 3/6] drivers: crypto: qce: skcipher: Fix regressions found during fuzz testing Thara Gopinath
2021-01-25 16:25   ` Bjorn Andersson

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=202101210725.kIB7M4Ei-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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 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.