From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH] crypto: move sm3 and sm4 into crypto directory
Date: Mon, 14 Mar 2022 17:07:19 +0800 [thread overview]
Message-ID: <202203141647.utMMhTc9-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4476 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <20220314031101.663883-1-Jason@zx2c4.com>
References: <20220314031101.663883-1-Jason@zx2c4.com>
TO: "Jason A. Donenfeld" <Jason@zx2c4.com>
TO: linux-crypto(a)vger.kernel.org
TO: herbert(a)gondor.apana.org.au
TO: tianjia.zhang(a)linux.alibaba.com
TO: ebiggers(a)kernel.org
CC: "Jason A. Donenfeld" <Jason@zx2c4.com>
Hi "Jason,
I love your patch! Perhaps something to improve:
[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on next-20220310]
[cannot apply to herbert-crypto-2.6/master crng-random/master v5.17-rc8]
[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/Jason-A-Donenfeld/crypto-move-sm3-and-sm4-into-crypto-directory/20220314-111353
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
:::::: branch date: 6 hours ago
:::::: commit date: 6 hours ago
compiler: sparc-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> crypto/sm4.c:171:25: warning: Same expression on both sides of '-'. [duplicateExpression]
put_unaligned_be32(x[3 - 3], out + 3 * 4);
^
vim +171 crypto/sm4.c
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 145
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 146 /**
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 147 * sm4_crypt_block - Encrypt or decrypt a single SM4 block
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 148 * @rk: The rkey_enc for encrypt or rkey_dec for decrypt
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 149 * @out: Buffer to store output data
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 150 * @in: Buffer containing the input data
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 151 */
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 152 void sm4_crypt_block(const u32 *rk, u8 *out, const u8 *in)
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 153 {
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 154 u32 x[4], i;
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 155
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 156 x[0] = get_unaligned_be32(in + 0 * 4);
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 157 x[1] = get_unaligned_be32(in + 1 * 4);
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 158 x[2] = get_unaligned_be32(in + 2 * 4);
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 159 x[3] = get_unaligned_be32(in + 3 * 4);
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 160
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 161 for (i = 0; i < 32; i += 4) {
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 162 x[0] = sm4_round(x[0], x[1], x[2], x[3], rk[i + 0]);
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 163 x[1] = sm4_round(x[1], x[2], x[3], x[0], rk[i + 1]);
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 164 x[2] = sm4_round(x[2], x[3], x[0], x[1], rk[i + 2]);
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 165 x[3] = sm4_round(x[3], x[0], x[1], x[2], rk[i + 3]);
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 166 }
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 167
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 168 put_unaligned_be32(x[3 - 0], out + 0 * 4);
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 169 put_unaligned_be32(x[3 - 1], out + 1 * 4);
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 170 put_unaligned_be32(x[3 - 2], out + 2 * 4);
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 @171 put_unaligned_be32(x[3 - 3], out + 3 * 4);
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 172 }
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 173 EXPORT_SYMBOL_GPL(sm4_crypt_block);
2b31277af577b1 lib/crypto/sm4.c Tianjia Zhang 2021-07-20 174
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next reply other threads:[~2022-03-14 9:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 9:07 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-03-14 3:11 [PATCH] crypto: move sm3 and sm4 into crypto directory Jason A. Donenfeld
2022-03-16 17:16 ` Eric Biggers
2022-03-16 22:18 ` Jason A. Donenfeld
2022-04-08 8:30 ` Herbert Xu
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=202203141647.utMMhTc9-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.