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  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:   Fri, 4 Sep 2020 01:24:41 +0800
From:   kernel test robot <lkp@...el.com>
To:     "David S. Miller" <davem@...emloft.net>
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org,
        Bob Copeland <me@...copeland.com>
Subject: [wireless-testsing2:master 4/5]
 drivers/net/ethernet/ibm/ibmvnic.c:473:7: warning: variable 'size_array' set
 but not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-testing.git master
head:   4962b497738dfcccbe7424333a4ac4f381969861
commit: ce55512f4e8fd5bd801badf3b7a5dc99670e5ca7 [4/5] Merge remote-tracking branch 'mac80211/master'
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
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
        git checkout ce55512f4e8fd5bd801badf3b7a5dc99670e5ca7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc 

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

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/ibm/ibmvnic.c: In function 'reset_rx_pools':
>> drivers/net/ethernet/ibm/ibmvnic.c:473:7: warning: variable 'size_array' set but not used [-Wunused-but-set-variable]
     473 |  u64 *size_array;
         |       ^~~~~~~~~~
   In file included from arch/powerpc/include/asm/paca.h:15,
                    from arch/powerpc/include/asm/current.h:13,
                    from include/linux/thread_info.h:21,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/powerpc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:16,
                    from drivers/net/ethernet/ibm/ibmvnic.c:35:
   In function 'strncpy',
       inlined from 'handle_vpd_rsp' at drivers/net/ethernet/ibm/ibmvnic.c:4019:3:
   include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation]
     297 | #define __underlying_strncpy __builtin_strncpy
         |                              ^
   include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
     307 |  return __underlying_strncpy(p, q, size);
         |         ^~~~~~~~~~~~~~~~~~~~

# https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-testing.git/commit/?id=ce55512f4e8fd5bd801badf3b7a5dc99670e5ca7
git remote add wireless-testsing2 https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-testing.git
git fetch --no-tags wireless-testsing2 master
git checkout ce55512f4e8fd5bd801badf3b7a5dc99670e5ca7
vim +/size_array +473 drivers/net/ethernet/ibm/ibmvnic.c

7bbc27a4961a7d Nathan Fontenot 2017-03-30  466  
8c0543adca2bb1 Nathan Fontenot 2017-05-26  467  static int reset_rx_pools(struct ibmvnic_adapter *adapter)
8c0543adca2bb1 Nathan Fontenot 2017-05-26  468  {
8c0543adca2bb1 Nathan Fontenot 2017-05-26  469  	struct ibmvnic_rx_pool *rx_pool;
507ebe6444a44d Thomas Falcon   2020-08-21  470  	u64 buff_size;
8c0543adca2bb1 Nathan Fontenot 2017-05-26  471  	int rx_scrqs;
f3be0cbc722c8d Thomas Falcon   2017-06-21  472  	int i, j, rc;
896d86959fee58 John Allen      2018-01-18 @473  	u64 *size_array;
896d86959fee58 John Allen      2018-01-18  474  
9f13457377907f Mingming Cao    2020-08-25  475  	if (!adapter->rx_pool)
9f13457377907f Mingming Cao    2020-08-25  476  		return -1;
9f13457377907f Mingming Cao    2020-08-25  477  
896d86959fee58 John Allen      2018-01-18  478  	size_array = (u64 *)((u8 *)(adapter->login_rsp_buf) +
896d86959fee58 John Allen      2018-01-18  479  		be32_to_cpu(adapter->login_rsp_buf->off_rxadd_buff_size));
896d86959fee58 John Allen      2018-01-18  480  
507ebe6444a44d Thomas Falcon   2020-08-21  481  	buff_size = adapter->cur_rx_buf_sz;
507ebe6444a44d Thomas Falcon   2020-08-21  482  	rx_scrqs = adapter->num_active_rx_pools;
8c0543adca2bb1 Nathan Fontenot 2017-05-26  483  	for (i = 0; i < rx_scrqs; i++) {
8c0543adca2bb1 Nathan Fontenot 2017-05-26  484  		rx_pool = &adapter->rx_pool[i];
8c0543adca2bb1 Nathan Fontenot 2017-05-26  485  
d1cf33d93166f1 Nathan Fontenot 2017-08-08  486  		netdev_dbg(adapter->netdev, "Re-setting rx_pool[%d]\n", i);
d1cf33d93166f1 Nathan Fontenot 2017-08-08  487  
507ebe6444a44d Thomas Falcon   2020-08-21  488  		if (rx_pool->buff_size != buff_size) {
896d86959fee58 John Allen      2018-01-18  489  			free_long_term_buff(adapter, &rx_pool->long_term_buff);
507ebe6444a44d Thomas Falcon   2020-08-21  490  			rx_pool->buff_size = buff_size;
7c940b1a5291e5 Thomas Falcon   2019-06-07  491  			rc = alloc_long_term_buff(adapter,
7c940b1a5291e5 Thomas Falcon   2019-06-07  492  						  &rx_pool->long_term_buff,
896d86959fee58 John Allen      2018-01-18  493  						  rx_pool->size *
896d86959fee58 John Allen      2018-01-18  494  						  rx_pool->buff_size);
896d86959fee58 John Allen      2018-01-18  495  		} else {
896d86959fee58 John Allen      2018-01-18  496  			rc = reset_long_term_buff(adapter,
896d86959fee58 John Allen      2018-01-18  497  						  &rx_pool->long_term_buff);
896d86959fee58 John Allen      2018-01-18  498  		}
896d86959fee58 John Allen      2018-01-18  499  
f3be0cbc722c8d Thomas Falcon   2017-06-21  500  		if (rc)
f3be0cbc722c8d Thomas Falcon   2017-06-21  501  			return rc;
8c0543adca2bb1 Nathan Fontenot 2017-05-26  502  
8c0543adca2bb1 Nathan Fontenot 2017-05-26  503  		for (j = 0; j < rx_pool->size; j++)
8c0543adca2bb1 Nathan Fontenot 2017-05-26  504  			rx_pool->free_map[j] = j;
8c0543adca2bb1 Nathan Fontenot 2017-05-26  505  
8c0543adca2bb1 Nathan Fontenot 2017-05-26  506  		memset(rx_pool->rx_buff, 0,
8c0543adca2bb1 Nathan Fontenot 2017-05-26  507  		       rx_pool->size * sizeof(struct ibmvnic_rx_buff));
8c0543adca2bb1 Nathan Fontenot 2017-05-26  508  
8c0543adca2bb1 Nathan Fontenot 2017-05-26  509  		atomic_set(&rx_pool->available, 0);
8c0543adca2bb1 Nathan Fontenot 2017-05-26  510  		rx_pool->next_alloc = 0;
8c0543adca2bb1 Nathan Fontenot 2017-05-26  511  		rx_pool->next_free = 0;
c3e53b9a3efe30 Thomas Falcon   2017-06-14  512  		rx_pool->active = 1;
8c0543adca2bb1 Nathan Fontenot 2017-05-26  513  	}
8c0543adca2bb1 Nathan Fontenot 2017-05-26  514  
8c0543adca2bb1 Nathan Fontenot 2017-05-26  515  	return 0;
8c0543adca2bb1 Nathan Fontenot 2017-05-26  516  }
8c0543adca2bb1 Nathan Fontenot 2017-05-26  517  

:::::: The code at line 473 was first introduced by commit
:::::: 896d86959fee58113fc510c70cd8d10e82aa3e6a ibmvnic: Modify buffer size and number of queues on failover

:::::: TO: John Allen <jallen@...ux.vnet.ibm.com>
:::::: CC: David S. Miller <davem@...emloft.net>

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

Download attachment ".config.gz" of type "application/gzip" (70511 bytes)

Powered by blists - more mailing lists