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] [day] [month] [year] [list]
Message-ID: <202109292354.EUZ90A4C-lkp@intel.com>
Date:   Wed, 29 Sep 2021 23:33:12 +0800
From:   kernel test robot <lkp@...el.com>
To:     Magnus Karlsson <magnus.karlsson@...il.com>,
        magnus.karlsson@...el.com, bjorn@...nel.org, ast@...nel.org,
        daniel@...earbox.net, netdev@...r.kernel.org,
        maciej.fijalkowski@...el.com, ciara.loftus@...el.com
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        jonathan.lemon@...il.com, bpf@...r.kernel.org,
        anthony.l.nguyen@...el.com
Subject: Re: [PATCH bpf-next 06/13] xsk: optimize for aligned case

Hi Magnus,

I love your patch! Yet something to improve:

[auto build test ERROR on 17b52c226a9a170f1611f69d12a71be05748aefd]

url:    https://github.com/0day-ci/linux/commits/Magnus-Karlsson/xsk-i40e-ice-introduce-batching-for-Rx-buffer-allocation/20210929-210813
base:   17b52c226a9a170f1611f69d12a71be05748aefd
config: riscv-buildonly-randconfig-r003-20210929 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/0day-ci/linux/commit/5a3442cd30198f6a7fb37ec0b8cad12bea1d5178
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Magnus-Karlsson/xsk-i40e-ice-introduce-batching-for-Rx-buffer-allocation/20210929-210813
        git checkout 5a3442cd30198f6a7fb37ec0b8cad12bea1d5178
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv 

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 >>):

>> net/xdp/xsk_buff_pool.c:465:15: error: variable 'xskb' is uninitialized when used here [-Werror,-Wuninitialized]
                           xp_release(xskb);
                                      ^~~~
   net/xdp/xsk_buff_pool.c:455:27: note: initialize the variable 'xskb' to silence this warning
           struct xdp_buff_xsk *xskb;
                                    ^
                                     = NULL
   1 error generated.


vim +/xskb +465 net/xdp/xsk_buff_pool.c

2b43470add8c8f Björn Töpel     2020-05-20  452  
2b43470add8c8f Björn Töpel     2020-05-20  453  static struct xdp_buff_xsk *__xp_alloc(struct xsk_buff_pool *pool)
2b43470add8c8f Björn Töpel     2020-05-20  454  {
2b43470add8c8f Björn Töpel     2020-05-20  455  	struct xdp_buff_xsk *xskb;
2b43470add8c8f Björn Töpel     2020-05-20  456  	u64 addr;
2b43470add8c8f Björn Töpel     2020-05-20  457  	bool ok;
2b43470add8c8f Björn Töpel     2020-05-20  458  
2b43470add8c8f Björn Töpel     2020-05-20  459  	if (pool->free_heads_cnt == 0)
2b43470add8c8f Björn Töpel     2020-05-20  460  		return NULL;
2b43470add8c8f Björn Töpel     2020-05-20  461  
2b43470add8c8f Björn Töpel     2020-05-20  462  	for (;;) {
2b43470add8c8f Björn Töpel     2020-05-20  463  		if (!xskq_cons_peek_addr_unchecked(pool->fq, &addr)) {
8aa5a33578e968 Ciara Loftus    2020-07-08  464  			pool->fq->queue_empty_descs++;
2b43470add8c8f Björn Töpel     2020-05-20 @465  			xp_release(xskb);
2b43470add8c8f Björn Töpel     2020-05-20  466  			return NULL;
2b43470add8c8f Björn Töpel     2020-05-20  467  		}
2b43470add8c8f Björn Töpel     2020-05-20  468  
2b43470add8c8f Björn Töpel     2020-05-20  469  		ok = pool->unaligned ? xp_check_unaligned(pool, &addr) :
2b43470add8c8f Björn Töpel     2020-05-20  470  		     xp_check_aligned(pool, &addr);
2b43470add8c8f Björn Töpel     2020-05-20  471  		if (!ok) {
2b43470add8c8f Björn Töpel     2020-05-20  472  			pool->fq->invalid_descs++;
2b43470add8c8f Björn Töpel     2020-05-20  473  			xskq_cons_release(pool->fq);
2b43470add8c8f Björn Töpel     2020-05-20  474  			continue;
2b43470add8c8f Björn Töpel     2020-05-20  475  		}
2b43470add8c8f Björn Töpel     2020-05-20  476  		break;
2b43470add8c8f Björn Töpel     2020-05-20  477  	}
2b43470add8c8f Björn Töpel     2020-05-20  478  
5a3442cd30198f Magnus Karlsson 2021-09-22  479  	if (pool->unaligned) {
5a3442cd30198f Magnus Karlsson 2021-09-22  480  		xskb = pool->free_heads[--pool->free_heads_cnt];
5a3442cd30198f Magnus Karlsson 2021-09-22  481  		xp_init_xskb_addr(xskb, pool, addr);
5a3442cd30198f Magnus Karlsson 2021-09-22  482  		if (pool->dma_pages_cnt)
5a3442cd30198f Magnus Karlsson 2021-09-22  483  			xp_init_xskb_dma(xskb, pool, pool->dma_pages, addr);
5a3442cd30198f Magnus Karlsson 2021-09-22  484  	} else {
5a3442cd30198f Magnus Karlsson 2021-09-22  485  		xskb = &pool->heads[xp_aligned_extract_idx(pool, addr)];
2b43470add8c8f Björn Töpel     2020-05-20  486  	}
5a3442cd30198f Magnus Karlsson 2021-09-22  487  
5a3442cd30198f Magnus Karlsson 2021-09-22  488  	xskq_cons_release(pool->fq);
2b43470add8c8f Björn Töpel     2020-05-20  489  	return xskb;
2b43470add8c8f Björn Töpel     2020-05-20  490  }
2b43470add8c8f Björn Töpel     2020-05-20  491  

---
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" (38714 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ