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: <202110281553.gXGnbY6f-lkp@intel.com>
Date:   Thu, 28 Oct 2021 15:38:05 +0800
From:   kernel test robot <lkp@...el.com>
To:     Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
        virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH 2/3] virtio: cache indirect desc for packed

Hi Xuan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on horms-ipvs/master]
[also build test ERROR on linus/master v5.15-rc7]
[cannot apply to mst-vhost/linux-next next-20211027]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Xuan-Zhuo/virtio-support-cache-indirect-desc/20211027-142025
base:   https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master
config: i386-buildonly-randconfig-r005-20211027 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5db7568a6a1fcb408eb8988abdaff2a225a8eb72)
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/0day-ci/linux/commit/bb65ceda850ed4592d8a940e01926d5e3d33ae92
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Xuan-Zhuo/virtio-support-cache-indirect-desc/20211027-142025
        git checkout bb65ceda850ed4592d8a940e01926d5e3d33ae92
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

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

>> drivers/virtio/virtio_ring.c:1467:7: error: variable 'len' is uninitialized when used here [-Werror,-Wuninitialized]
                   n = len / sizeof(struct vring_packed_desc);
                       ^~~
   drivers/virtio/virtio_ring.c:1460:10: note: initialize the variable 'len' to silence this warning
                   u32 len, n;
                          ^
                           = 0
   1 error generated.


vim +/len +1467 drivers/virtio/virtio_ring.c

  1433	
  1434	static void detach_buf_packed(struct vring_virtqueue *vq,
  1435				      unsigned int id, void **ctx)
  1436	{
  1437		struct vring_desc_state_packed *state = NULL;
  1438		struct vring_packed_desc *desc;
  1439		unsigned int i, curr;
  1440	
  1441		state = &vq->packed.desc_state[id];
  1442	
  1443		/* Clear data ptr. */
  1444		state->data = NULL;
  1445	
  1446		vq->packed.desc_extra[state->last].next = vq->free_head;
  1447		vq->free_head = id;
  1448		vq->vq.num_free += state->num;
  1449	
  1450		if (unlikely(vq->use_dma_api)) {
  1451			curr = id;
  1452			for (i = 0; i < state->num; i++) {
  1453				vring_unmap_state_packed(vq,
  1454					&vq->packed.desc_extra[curr]);
  1455				curr = vq->packed.desc_extra[curr].next;
  1456			}
  1457		}
  1458	
  1459		if (vq->indirect) {
  1460			u32 len, n;
  1461	
  1462			/* Free the indirect table, if any, now that it's unmapped. */
  1463			desc = state->indir_desc;
  1464			if (!desc)
  1465				return;
  1466	
> 1467			n = len / sizeof(struct vring_packed_desc);
  1468	
  1469			if (vq->use_dma_api) {
  1470				len = vq->packed.desc_extra[id].len;
  1471				for (i = 0; i < n; i++)
  1472					vring_unmap_desc_packed(vq, &desc[i]);
  1473			}
  1474	
  1475			desc_cache_put_packed(vq, desc, n);
  1476			state->indir_desc = NULL;
  1477		} else if (ctx) {
  1478			*ctx = state->indir_desc;
  1479		}
  1480	}
  1481	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ