lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 22 Jan 2022 16:42:27 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alexander K <ak@...pesta-tech.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Chuck Lever <chuck.lever@...cle.com>
Subject: [cel:topic-rpc-with-tls 9991/9999]
 arch/x86/crypto/sha1_ssse3_glue.c:105:6: error: implicit declaration of
 function 'boot_cpu_has'

Hi Alexander,

First bad commit (maybe != root cause):

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux topic-rpc-with-tls
head:   a72d5318846d67a7f3f5f2bcb4c0c09c4f8907d1
commit: a0a99a10f4f0e3e1e35e566687137669da78abcd [9991/9999] Port of Tempesta TLS handshakes to the Linux 5.10.68
config: um-allyesconfig (https://download.01.org/0day-ci/archive/20220122/202201221614.YmhmBHxe-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/commit/?id=a0a99a10f4f0e3e1e35e566687137669da78abcd
        git remote add cel git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
        git fetch --no-tags cel topic-rpc-with-tls
        git checkout a0a99a10f4f0e3e1e35e566687137669da78abcd
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=um SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
   arch/x86/crypto/sha1_ssse3_glue.c: In function 'register_sha1_ssse3':
>> arch/x86/crypto/sha1_ssse3_glue.c:105:6: error: implicit declaration of function 'boot_cpu_has' [-Werror=implicit-function-declaration]
     105 |  if (boot_cpu_has(X86_FEATURE_SSSE3))
         |      ^~~~~~~~~~~~
   arch/x86/crypto/sha1_ssse3_glue.c: In function 'avx_usable':
>> arch/x86/crypto/sha1_ssse3_glue.c:154:25: error: 'XFEATURE_MASK_SSE' undeclared (first use in this function)
     154 |  if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL)) {
         |                         ^~~~~~~~~~~~~~~~~
   arch/x86/crypto/sha1_ssse3_glue.c:154:25: note: each undeclared identifier is reported only once for each function it appears in
>> arch/x86/crypto/sha1_ssse3_glue.c:154:45: error: 'XFEATURE_MASK_YMM' undeclared (first use in this function)
     154 |  if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL)) {
         |                                             ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for MFD_CORE
   Depends on HAS_IOMEM
   Selected by
   - MFD_HI6421_SPMI && STAGING && OF && SPMI
   WARNING: unmet direct dependencies detected for CRYPTO_SHA1_SSSE3
   Depends on CRYPTO && X86 && 64BIT
   Selected by
   - TLS_HANDSHAKE && NET && TLS


vim +/boot_cpu_has +105 arch/x86/crypto/sha1_ssse3_glue.c

66be895158886a Mathias Krause  2011-08-04  102  
85c66ecd6f2144 tim             2015-09-16  103  static int register_sha1_ssse3(void)
85c66ecd6f2144 tim             2015-09-16  104  {
85c66ecd6f2144 tim             2015-09-16 @105  	if (boot_cpu_has(X86_FEATURE_SSSE3))
85c66ecd6f2144 tim             2015-09-16  106  		return crypto_register_shash(&sha1_ssse3_alg);
85c66ecd6f2144 tim             2015-09-16  107  	return 0;
85c66ecd6f2144 tim             2015-09-16  108  }
85c66ecd6f2144 tim             2015-09-16  109  
85c66ecd6f2144 tim             2015-09-16  110  static void unregister_sha1_ssse3(void)
85c66ecd6f2144 tim             2015-09-16  111  {
85c66ecd6f2144 tim             2015-09-16  112  	if (boot_cpu_has(X86_FEATURE_SSSE3))
85c66ecd6f2144 tim             2015-09-16  113  		crypto_unregister_shash(&sha1_ssse3_alg);
85c66ecd6f2144 tim             2015-09-16  114  }
85c66ecd6f2144 tim             2015-09-16  115  
41419a28901083 Kees Cook       2020-01-14  116  asmlinkage void sha1_transform_avx(struct sha1_state *state,
41419a28901083 Kees Cook       2020-01-14  117  				   const u8 *data, int blocks);
85c66ecd6f2144 tim             2015-09-16  118  
85c66ecd6f2144 tim             2015-09-16  119  static int sha1_avx_update(struct shash_desc *desc, const u8 *data,
85c66ecd6f2144 tim             2015-09-16  120  			     unsigned int len)
85c66ecd6f2144 tim             2015-09-16  121  {
41419a28901083 Kees Cook       2020-01-14  122  	return sha1_update(desc, data, len, sha1_transform_avx);
85c66ecd6f2144 tim             2015-09-16  123  }
85c66ecd6f2144 tim             2015-09-16  124  
85c66ecd6f2144 tim             2015-09-16  125  static int sha1_avx_finup(struct shash_desc *desc, const u8 *data,
85c66ecd6f2144 tim             2015-09-16  126  			      unsigned int len, u8 *out)
85c66ecd6f2144 tim             2015-09-16  127  {
41419a28901083 Kees Cook       2020-01-14  128  	return sha1_finup(desc, data, len, out, sha1_transform_avx);
85c66ecd6f2144 tim             2015-09-16  129  }
85c66ecd6f2144 tim             2015-09-16  130  
85c66ecd6f2144 tim             2015-09-16  131  static int sha1_avx_final(struct shash_desc *desc, u8 *out)
85c66ecd6f2144 tim             2015-09-16  132  {
85c66ecd6f2144 tim             2015-09-16  133  	return sha1_avx_finup(desc, NULL, 0, out);
85c66ecd6f2144 tim             2015-09-16  134  }
85c66ecd6f2144 tim             2015-09-16  135  
85c66ecd6f2144 tim             2015-09-16  136  static struct shash_alg sha1_avx_alg = {
85c66ecd6f2144 tim             2015-09-16  137  	.digestsize	=	SHA1_DIGEST_SIZE,
85c66ecd6f2144 tim             2015-09-16  138  	.init		=	sha1_base_init,
85c66ecd6f2144 tim             2015-09-16  139  	.update		=	sha1_avx_update,
85c66ecd6f2144 tim             2015-09-16  140  	.final		=	sha1_avx_final,
85c66ecd6f2144 tim             2015-09-16  141  	.finup		=	sha1_avx_finup,
85c66ecd6f2144 tim             2015-09-16  142  	.descsize	=	sizeof(struct sha1_state),
85c66ecd6f2144 tim             2015-09-16  143  	.base		=	{
85c66ecd6f2144 tim             2015-09-16  144  		.cra_name	=	"sha1",
85c66ecd6f2144 tim             2015-09-16  145  		.cra_driver_name =	"sha1-avx",
85c66ecd6f2144 tim             2015-09-16  146  		.cra_priority	=	160,
85c66ecd6f2144 tim             2015-09-16  147  		.cra_blocksize	=	SHA1_BLOCK_SIZE,
85c66ecd6f2144 tim             2015-09-16  148  		.cra_module	=	THIS_MODULE,
85c66ecd6f2144 tim             2015-09-16  149  	}
85c66ecd6f2144 tim             2015-09-16  150  };
85c66ecd6f2144 tim             2015-09-16  151  
85c66ecd6f2144 tim             2015-09-16  152  static bool avx_usable(void)
66be895158886a Mathias Krause  2011-08-04  153  {
d91cab78133d33 Dave Hansen     2015-09-02 @154  	if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL)) {
da154e82af4d0c Borislav Petkov 2016-04-04  155  		if (boot_cpu_has(X86_FEATURE_AVX))
66be895158886a Mathias Krause  2011-08-04  156  			pr_info("AVX detected but unusable.\n");
66be895158886a Mathias Krause  2011-08-04  157  		return false;
66be895158886a Mathias Krause  2011-08-04  158  	}
66be895158886a Mathias Krause  2011-08-04  159  
66be895158886a Mathias Krause  2011-08-04  160  	return true;
66be895158886a Mathias Krause  2011-08-04  161  }
6ca5afb8c26991 Mathias Krause  2014-03-24  162  

:::::: The code at line 105 was first introduced by commit
:::::: 85c66ecd6f2144c075044292359e179b20af1f2d crypto: x86/sha - Restructure x86 sha1 glue code to expose all the available sha1 transforms

:::::: TO: tim <tim.c.chen@...ux.intel.com>
:::::: CC: Herbert Xu <herbert@...dor.apana.org.au>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ