tree:
https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git wip-crypto
head: b0fff3c09aeaecdd2f961eae6189247fa4d7712b
commit: b0fff3c09aeaecdd2f961eae6189247fa4d7712b [5/5] crypto: sha - split sha.h into
sha1.h and sha2.h
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout b0fff3c09aeaecdd2f961eae6189247fa4d7712b
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
In file included from drivers/crypto/chelsio/chcr_ipsec.c:63:
> drivers/crypto/chelsio/chcr_algo.h:340:35: error:
'SHA256_DIGEST_SIZE' undeclared here (not in a function); did you mean
'SHA1_DIGEST_SIZE'?
340 | static const u32
chcr_sha224_init[SHA256_DIGEST_SIZE / 4] = {
| ^~~~~~~~~~~~~~~~~~
| SHA1_DIGEST_SIZE
> drivers/crypto/chelsio/chcr_algo.h:341:3: error:
'SHA224_H0' undeclared here (not in a function); did you mean 'SHA1_H0'?
341 | SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3,
| ^~~~~~~~~
| SHA1_H0
> drivers/crypto/chelsio/chcr_algo.h:341:14: error:
'SHA224_H1' undeclared here (not in a function); did you mean 'SHA1_H1'?
341 | SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3,
| ^~~~~~~~~
| SHA1_H1
> drivers/crypto/chelsio/chcr_algo.h:341:25: error:
'SHA224_H2' undeclared here (not in a function); did you mean 'SHA1_H2'?
341 | SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3,
| ^~~~~~~~~
| SHA1_H2
> drivers/crypto/chelsio/chcr_algo.h:341:36: error:
'SHA224_H3' undeclared here (not in a function); did you mean 'SHA1_H3'?
341 | SHA224_H0, SHA224_H1, SHA224_H2, SHA224_H3,
| ^~~~~~~~~
| SHA1_H3
> drivers/crypto/chelsio/chcr_algo.h:342:3: error:
'SHA224_H4' undeclared here (not in a function); did you mean 'SHA1_H4'?
342 | SHA224_H4, SHA224_H5, SHA224_H6, SHA224_H7,
| ^~~~~~~~~
| SHA1_H4
> drivers/crypto/chelsio/chcr_algo.h:342:14: error:
'SHA224_H5' undeclared here (not in a function)
342 | SHA224_H4,
SHA224_H5, SHA224_H6, SHA224_H7,
| ^~~~~~~~~
> drivers/crypto/chelsio/chcr_algo.h:342:25: error:
'SHA224_H6' undeclared here (not in a function)
342 | SHA224_H4,
SHA224_H5, SHA224_H6, SHA224_H7,
| ^~~~~~~~~
> drivers/crypto/chelsio/chcr_algo.h:342:36: error:
'SHA224_H7' undeclared here (not in a function)
342 | SHA224_H4,
SHA224_H5, SHA224_H6, SHA224_H7,
| ^~~~~~~~~
> drivers/crypto/chelsio/chcr_algo.h:346:3: error:
'SHA256_H0' undeclared here (not in a function); did you mean 'SHA1_H0'?
346 | SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
| ^~~~~~~~~
| SHA1_H0
> drivers/crypto/chelsio/chcr_algo.h:346:14: error:
'SHA256_H1' undeclared here (not in a function); did you mean 'SHA1_H1'?
346 | SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
| ^~~~~~~~~
| SHA1_H1
> drivers/crypto/chelsio/chcr_algo.h:346:25: error:
'SHA256_H2' undeclared here (not in a function); did you mean 'SHA1_H2'?
346 | SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
| ^~~~~~~~~
| SHA1_H2
> drivers/crypto/chelsio/chcr_algo.h:346:36: error:
'SHA256_H3' undeclared here (not in a function); did you mean 'SHA1_H3'?
346 | SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
| ^~~~~~~~~
| SHA1_H3
> drivers/crypto/chelsio/chcr_algo.h:347:3: error:
'SHA256_H4' undeclared here (not in a function); did you mean 'SHA1_H4'?
347 | SHA256_H4, SHA256_H5, SHA256_H6, SHA256_H7,
| ^~~~~~~~~
| SHA1_H4
> drivers/crypto/chelsio/chcr_algo.h:347:14: error:
'SHA256_H5' undeclared here (not in a function)
347 | SHA256_H4,
SHA256_H5, SHA256_H6, SHA256_H7,
| ^~~~~~~~~
> drivers/crypto/chelsio/chcr_algo.h:347:25: error:
'SHA256_H6' undeclared here (not in a function)
347 | SHA256_H4,
SHA256_H5, SHA256_H6, SHA256_H7,
| ^~~~~~~~~
> drivers/crypto/chelsio/chcr_algo.h:347:36: error:
'SHA256_H7' undeclared here (not in a function)
347 | SHA256_H4,
SHA256_H5, SHA256_H6, SHA256_H7,
| ^~~~~~~~~
> drivers/crypto/chelsio/chcr_algo.h:350:35: error:
'SHA512_DIGEST_SIZE' undeclared here (not in a function); did you mean
'SHA1_DIGEST_SIZE'?
350 | static const u64
chcr_sha384_init[SHA512_DIGEST_SIZE / 8] = {
| ^~~~~~~~~~~~~~~~~~
| SHA1_DIGEST_SIZE
> drivers/crypto/chelsio/chcr_algo.h:351:3: error:
'SHA384_H0' undeclared here (not in a function); did you mean 'SHA1_H0'?
351 | SHA384_H0, SHA384_H1, SHA384_H2, SHA384_H3,
| ^~~~~~~~~
| SHA1_H0
> drivers/crypto/chelsio/chcr_algo.h:351:14: error:
'SHA384_H1' undeclared here (not in a function); did you mean 'SHA1_H1'?
351 | SHA384_H0, SHA384_H1, SHA384_H2, SHA384_H3,
| ^~~~~~~~~
| SHA1_H1
drivers/crypto/chelsio/chcr_algo.h:351:25: error: 'SHA384_H2' undeclared here (not
in a function); did you mean 'SHA1_H2'?
351 | SHA384_H0, SHA384_H1, SHA384_H2, SHA384_H3,
| ^~~~~~~~~
| SHA1_H2
drivers/crypto/chelsio/chcr_algo.h:351:36: error: 'SHA384_H3' undeclared here (not
in a function); did you mean 'SHA1_H3'?
351 | SHA384_H0, SHA384_H1, SHA384_H2, SHA384_H3,
| ^~~~~~~~~
| SHA1_H3
drivers/crypto/chelsio/chcr_algo.h:352:3: error: 'SHA384_H4' undeclared here (not
in a function); did you mean 'SHA1_H4'?
352 | SHA384_H4, SHA384_H5, SHA384_H6, SHA384_H7,
| ^~~~~~~~~
| SHA1_H4
drivers/crypto/chelsio/chcr_algo.h:352:14: error: 'SHA384_H5' undeclared here (not
in a function)
352 | SHA384_H4, SHA384_H5, SHA384_H6, SHA384_H7,
| ^~~~~~~~~
drivers/crypto/chelsio/chcr_algo.h:352:25: error: 'SHA384_H6' undeclared here (not
in a function)
352 | SHA384_H4, SHA384_H5, SHA384_H6, SHA384_H7,
| ^~~~~~~~~
drivers/crypto/chelsio/chcr_algo.h:352:36: error: 'SHA384_H7' undeclared here (not
in a function)
352 | SHA384_H4, SHA384_H5, SHA384_H6, SHA384_H7,
| ^~~~~~~~~
drivers/crypto/chelsio/chcr_algo.h:356:3: error: 'SHA512_H0' undeclared here (not
in a function); did you mean 'SHA1_H0'?
356 | SHA512_H0, SHA512_H1, SHA512_H2, SHA512_H3,
| ^~~~~~~~~
| SHA1_H0
drivers/crypto/chelsio/chcr_algo.h:356:14: error: 'SHA512_H1' undeclared here (not
in a function); did you mean 'SHA1_H1'?
356 | SHA512_H0, SHA512_H1, SHA512_H2, SHA512_H3,
| ^~~~~~~~~
| SHA1_H1
drivers/crypto/chelsio/chcr_algo.h:356:25: error: 'SHA512_H2' undeclared here (not
in a function); did you mean 'SHA1_H2'?
356 | SHA512_H0, SHA512_H1, SHA512_H2, SHA512_H3,
| ^~~~~~~~~
| SHA1_H2
drivers/crypto/chelsio/chcr_algo.h:356:36: error: 'SHA512_H3' undeclared here (not
in a function); did you mean 'SHA1_H3'?
356 | SHA512_H0, SHA512_H1, SHA512_H2, SHA512_H3,
| ^~~~~~~~~
| SHA1_H3
drivers/crypto/chelsio/chcr_algo.h:357:3: error: 'SHA512_H4' undeclared here (not
in a function); did you mean 'SHA1_H4'?
357 | SHA512_H4, SHA512_H5, SHA512_H6, SHA512_H7,
| ^~~~~~~~~
| SHA1_H4
drivers/crypto/chelsio/chcr_algo.h:357:14: error: 'SHA512_H5' undeclared here (not
in a function); did you mean 'SHA1_H0'?
357 | SHA512_H4, SHA512_H5, SHA512_H6, SHA512_H7,
| ^~~~~~~~~
| SHA1_H0
drivers/crypto/chelsio/chcr_algo.h:357:25: error: 'SHA512_H6' undeclared here (not
in a function); did you mean 'SHA1_H0'?
357 | SHA512_H4, SHA512_H5, SHA512_H6, SHA512_H7,
| ^~~~~~~~~
| SHA1_H0
drivers/crypto/chelsio/chcr_algo.h:357:36: error: 'SHA512_H7' undeclared here (not
in a function); did you mean 'SHA1_H0'?
357 | SHA512_H4, SHA512_H5, SHA512_H6, SHA512_H7,
| ^~~~~~~~~
| SHA1_H0
drivers/crypto/chelsio/chcr_algo.h: In function 'copy_hash_init_values':
drivers/crypto/chelsio/chcr_algo.h:373:7: error: 'SHA224_DIGEST_SIZE' undeclared
(first use in this function); did you mean 'SHA1_DIGEST_SIZE'?
373 | case SHA224_DIGEST_SIZE:
| ^~~~~~~~~~~~~~~~~~
| SHA1_DIGEST_SIZE
drivers/crypto/chelsio/chcr_algo.h:373:7: note: each undeclared identifier is reported
only once for each function it appears in
drivers/crypto/chelsio/chcr_algo.h:381:7: error: 'SHA384_DIGEST_SIZE' undeclared
(first use in this function); did you mean 'SHA1_DIGEST_SIZE'?
381 | case SHA384_DIGEST_SIZE:
| ^~~~~~~~~~~~~~~~~~
| SHA1_DIGEST_SIZE
At top level:
drivers/crypto/chelsio/chcr_algo.h:355:18: warning: 'chcr_sha512_init' defined but
not used [-Wunused-variable]
355 | static const u64 chcr_sha512_init[SHA512_DIGEST_SIZE / 8] = {
| ^~~~~~~~~~~~~~~~
drivers/crypto/chelsio/chcr_algo.h:350:18: warning: 'chcr_sha384_init' defined but
not used [-Wunused-variable]
350 | static const u64 chcr_sha384_init[SHA512_DIGEST_SIZE / 8] = {
| ^~~~~~~~~~~~~~~~
drivers/crypto/chelsio/chcr_algo.h:345:18: warning: 'chcr_sha256_init' defined but
not used [-Wunused-variable]
345 | static const u32 chcr_sha256_init[SHA256_DIGEST_SIZE / 4] = {
| ^~~~~~~~~~~~~~~~
drivers/crypto/chelsio/chcr_algo.h:340:18: warning: 'chcr_sha224_init' defined but
not used [-Wunused-variable]
340 | static const u32 chcr_sha224_init[SHA256_DIGEST_SIZE / 4] = {
| ^~~~~~~~~~~~~~~~
vim +340 drivers/crypto/chelsio/chcr_algo.h
324429d74127d0 Hariprasad Shenai 2016-08-17 339
6e4655e20d92c9 Hans de Goede 2019-09-01 @340 static const u32
chcr_sha224_init[SHA256_DIGEST_SIZE / 4] = {
324429d74127d0 Hariprasad Shenai 2016-08-17 @341 SHA224_H0, SHA224_H1, SHA224_H2,
SHA224_H3,
324429d74127d0 Hariprasad Shenai 2016-08-17 @342 SHA224_H4, SHA224_H5, SHA224_H6,
SHA224_H7,
324429d74127d0 Hariprasad Shenai 2016-08-17 343 };
324429d74127d0 Hariprasad Shenai 2016-08-17 344
6e4655e20d92c9 Hans de Goede 2019-09-01 345 static const u32
chcr_sha256_init[SHA256_DIGEST_SIZE / 4] = {
324429d74127d0 Hariprasad Shenai 2016-08-17 @346 SHA256_H0, SHA256_H1, SHA256_H2,
SHA256_H3,
324429d74127d0 Hariprasad Shenai 2016-08-17 @347 SHA256_H4, SHA256_H5, SHA256_H6,
SHA256_H7,
324429d74127d0 Hariprasad Shenai 2016-08-17 348 };
324429d74127d0 Hariprasad Shenai 2016-08-17 349
6e4655e20d92c9 Hans de Goede 2019-09-01 @350 static const u64
chcr_sha384_init[SHA512_DIGEST_SIZE / 8] = {
324429d74127d0 Hariprasad Shenai 2016-08-17 @351 SHA384_H0, SHA384_H1, SHA384_H2,
SHA384_H3,
324429d74127d0 Hariprasad Shenai 2016-08-17 @352 SHA384_H4, SHA384_H5, SHA384_H6,
SHA384_H7,
324429d74127d0 Hariprasad Shenai 2016-08-17 353 };
324429d74127d0 Hariprasad Shenai 2016-08-17 354
6e4655e20d92c9 Hans de Goede 2019-09-01 355 static const u64
chcr_sha512_init[SHA512_DIGEST_SIZE / 8] = {
324429d74127d0 Hariprasad Shenai 2016-08-17 @356 SHA512_H0, SHA512_H1, SHA512_H2,
SHA512_H3,
324429d74127d0 Hariprasad Shenai 2016-08-17 @357 SHA512_H4, SHA512_H5, SHA512_H6,
SHA512_H7,
324429d74127d0 Hariprasad Shenai 2016-08-17 358 };
324429d74127d0 Hariprasad Shenai 2016-08-17 359
324429d74127d0 Hariprasad Shenai 2016-08-17 360 static inline void
copy_hash_init_values(char *key, int digestsize)
324429d74127d0 Hariprasad Shenai 2016-08-17 361 {
324429d74127d0 Hariprasad Shenai 2016-08-17 362 u8 i;
324429d74127d0 Hariprasad Shenai 2016-08-17 363 __be32 *dkey = (__be32 *)key;
324429d74127d0 Hariprasad Shenai 2016-08-17 364 u64 *ldkey = (u64 *)key;
6e4655e20d92c9 Hans de Goede 2019-09-01 365 __be64 *sha384 = (__be64
*)chcr_sha384_init;
6e4655e20d92c9 Hans de Goede 2019-09-01 366 __be64 *sha512 = (__be64
*)chcr_sha512_init;
324429d74127d0 Hariprasad Shenai 2016-08-17 367
324429d74127d0 Hariprasad Shenai 2016-08-17 368 switch (digestsize) {
324429d74127d0 Hariprasad Shenai 2016-08-17 369 case SHA1_DIGEST_SIZE:
324429d74127d0 Hariprasad Shenai 2016-08-17 370 for (i = 0; i < SHA1_INIT_STATE;
i++)
6e4655e20d92c9 Hans de Goede 2019-09-01 371 dkey[i] =
cpu_to_be32(chcr_sha1_init[i]);
324429d74127d0 Hariprasad Shenai 2016-08-17 372 break;
324429d74127d0 Hariprasad Shenai 2016-08-17 @373 case SHA224_DIGEST_SIZE:
324429d74127d0 Hariprasad Shenai 2016-08-17 374 for (i = 0; i < SHA224_INIT_STATE;
i++)
6e4655e20d92c9 Hans de Goede 2019-09-01 375 dkey[i] =
cpu_to_be32(chcr_sha224_init[i]);
324429d74127d0 Hariprasad Shenai 2016-08-17 376 break;
324429d74127d0 Hariprasad Shenai 2016-08-17 377 case SHA256_DIGEST_SIZE:
324429d74127d0 Hariprasad Shenai 2016-08-17 378 for (i = 0; i < SHA256_INIT_STATE;
i++)
6e4655e20d92c9 Hans de Goede 2019-09-01 379 dkey[i] =
cpu_to_be32(chcr_sha256_init[i]);
324429d74127d0 Hariprasad Shenai 2016-08-17 380 break;
324429d74127d0 Hariprasad Shenai 2016-08-17 @381 case SHA384_DIGEST_SIZE:
324429d74127d0 Hariprasad Shenai 2016-08-17 382 for (i = 0; i < SHA384_INIT_STATE;
i++)
324429d74127d0 Hariprasad Shenai 2016-08-17 383 ldkey[i] = be64_to_cpu(sha384[i]);
324429d74127d0 Hariprasad Shenai 2016-08-17 384 break;
324429d74127d0 Hariprasad Shenai 2016-08-17 385 case SHA512_DIGEST_SIZE:
324429d74127d0 Hariprasad Shenai 2016-08-17 386 for (i = 0; i < SHA512_INIT_STATE;
i++)
324429d74127d0 Hariprasad Shenai 2016-08-17 387 ldkey[i] = be64_to_cpu(sha512[i]);
324429d74127d0 Hariprasad Shenai 2016-08-17 388 break;
324429d74127d0 Hariprasad Shenai 2016-08-17 389 }
324429d74127d0 Hariprasad Shenai 2016-08-17 390 }
324429d74127d0 Hariprasad Shenai 2016-08-17 391
:::::: The code at line 340 was first introduced by commit
:::::: 6e4655e20d92c902932dc65909c31c414b4aba2d crypto: chelsio - Rename arrays to avoid
conflict with crypto/sha256.h
:::::: TO: Hans de Goede <hdegoede(a)redhat.com>
:::::: CC: Herbert Xu <herbert(a)gondor.apana.org.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org