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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202305130722.D7icLQEP-lkp@intel.com>
Date:   Sat, 13 May 2023 07:23:43 +0800
From:   kernel test robot <lkp@...el.com>
To:     Dmitry Safonov <dima@...sta.com>, linux-kernel@...r.kernel.org,
        David Ahern <dsahern@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        netdev@...r.kernel.org, Dmitry Safonov <dima@...sta.com>,
        Andy Lutomirski <luto@...capital.net>,
        Ard Biesheuvel <ardb@...nel.org>,
        Bob Gilligan <gilligan@...sta.com>,
        Dan Carpenter <error27@...il.com>,
        David Laight <David.Laight@...lab.com>,
        Eric Biggers <ebiggers@...nel.org>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        Francesco Ruggeri <fruggeri05@...il.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        Ivan Delalande <colona@...sta.com>,
        Leonard Crestez <cdleonard@...il.com>,
        Salam Noureddine <noureddine@...sta.com>
Subject: Re: [PATCH v6 01/21] net/tcp: Prepare tcp_md5sig_pool for TCP-AO

Hi Dmitry,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 47a2ee5d4a0bda05decdda7be0a77e792cdb09a3]

url:    https://github.com/intel-lab-lkp/linux/commits/Dmitry-Safonov/net-tcp-Prepare-tcp_md5sig_pool-for-TCP-AO/20230513-042734
base:   47a2ee5d4a0bda05decdda7be0a77e792cdb09a3
patch link:    https://lore.kernel.org/r/20230512202311.2845526-2-dima%40arista.com
patch subject: [PATCH v6 01/21] net/tcp: Prepare tcp_md5sig_pool for TCP-AO
config: x86_64-randconfig-a005 (https://download.01.org/0day-ci/archive/20230513/202305130722.D7icLQEP-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/20045e7dda43aca6500ad05a899dcf5c59e9f63a
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Dmitry-Safonov/net-tcp-Prepare-tcp_md5sig_pool-for-TCP-AO/20230513-042734
        git checkout 20045e7dda43aca6500ad05a899dcf5c59e9f63a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash net/ipv4/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305130722.D7icLQEP-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> net/ipv4/tcp_sigpool.c:161:9: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
           return ret;
                  ^~~
   net/ipv4/tcp_sigpool.c:110:14: note: initialize the variable 'ret' to silence this warning
           int cpu, ret;
                       ^
                        = 0
   1 warning generated.


vim +/ret +161 net/ipv4/tcp_sigpool.c

   105	
   106	static int __cpool_alloc_pcp(struct sigpool_entry *e, const char *alg,
   107				     struct crypto_ahash *cpu0_hash)
   108	{
   109		struct crypto_ahash *hash;
   110		int cpu, ret;
   111	
   112		e->spr.pcp_req = alloc_percpu(struct ahash_request *);
   113		if (!e->spr.pcp_req)
   114			return -ENOMEM;
   115	
   116		hash = cpu0_hash;
   117		for_each_possible_cpu(cpu) {
   118			struct ahash_request *req;
   119	
   120			/* If ahash has a key - it has to be allocated per-CPU.
   121			 * In such case re-use for CPU0 hash that just have been
   122			 * allocated above.
   123			 */
   124			if (!hash)
   125				hash = crypto_alloc_ahash(alg, 0, CRYPTO_ALG_ASYNC);
   126			if (IS_ERR(hash))
   127				goto out_free_per_cpu;
   128	
   129			req = ahash_request_alloc(hash, GFP_KERNEL);
   130			if (!req)
   131				goto out_free_hash;
   132	
   133			ahash_request_set_callback(req, 0, NULL, NULL);
   134	
   135			*per_cpu_ptr(e->spr.pcp_req, cpu) = req;
   136	
   137			if (e->needs_key)
   138				hash = NULL;
   139		}
   140		return 0;
   141	
   142	out_free_hash:
   143		if (hash != cpu0_hash)
   144			crypto_free_ahash(hash);
   145	
   146	out_free_per_cpu:
   147		for_each_possible_cpu(cpu) {
   148			struct ahash_request *req = *per_cpu_ptr(e->spr.pcp_req, cpu);
   149			struct crypto_ahash *pcpu_hash;
   150	
   151			if (!req)
   152				break;
   153			pcpu_hash = crypto_ahash_reqtfm(req);
   154			ahash_request_free(req);
   155			/* hash per-CPU, e->needs_key == true */
   156			if (pcpu_hash != cpu0_hash)
   157				crypto_free_ahash(pcpu_hash);
   158		}
   159	
   160		free_percpu(e->spr.pcp_req);
 > 161		return ret;
   162	}
   163	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ