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, 12 Oct 2019 01:50:11 +0800
From:   kbuild test robot <lkp@...el.com>
To:     "Michael S. Tsirkin" <mst@...hat.com>
Cc:     kbuild-all@...org, kvm@...r.kernel.org,
        virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org
Subject: [vhost:vhost 6/6] drivers/vhost/vhost.c:2672:9: error: 'desc'
 undeclared; did you mean 'rdtsc'?

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
head:   2b91e7f7cb5a6f12a2f43b200cb2d65a218237ed
commit: 2b91e7f7cb5a6f12a2f43b200cb2d65a218237ed [6/6] vhost: batching fetches
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
        git checkout 2b91e7f7cb5a6f12a2f43b200cb2d65a218237ed
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All errors (new ones prefixed by >>):

   drivers/vhost/vhost.c: In function 'vhost_get_vq_desc_batch':
>> drivers/vhost/vhost.c:2672:9: error: 'desc' undeclared (first use in this function); did you mean 'rdtsc'?
      if (!(desc->flags & VRING_DESC_F_NEXT))
            ^~~~
            rdtsc
   drivers/vhost/vhost.c:2672:9: note: each undeclared identifier is reported only once for each function it appears in

vim +2672 drivers/vhost/vhost.c

  2569	
  2570	/* This looks in the virtqueue and for the first available buffer, and converts
  2571	 * it to an iovec for convenient access.  Since descriptors consist of some
  2572	 * number of output then some number of input descriptors, it's actually two
  2573	 * iovecs, but we pack them into one and note how many of each there were.
  2574	 *
  2575	 * This function returns the descriptor number found, or vq->num (which is
  2576	 * never a valid descriptor number) if none was found.  A negative code is
  2577	 * returned on error. */
  2578	int vhost_get_vq_desc_batch(struct vhost_virtqueue *vq,
  2579			      struct iovec iov[], unsigned int iov_size,
  2580			      unsigned int *out_num, unsigned int *in_num,
  2581			      struct vhost_log *log, unsigned int *log_num)
  2582	{
  2583		int ret = fetch_descs(vq);
  2584		struct vhost_desc *last;
  2585		u16 id;
  2586		int i;
  2587	
  2588		if (ret)
  2589			return ret;
  2590	
  2591		/* Note: indirect descriptors are not batched */
  2592		/* TODO: batch up to a limit */
  2593		last = peek_split_desc(vq);
  2594		id = last->id;
  2595	
  2596		if (last->flags & VRING_DESC_F_INDIRECT) {
  2597				int r;
  2598	
  2599				pop_split_desc(vq);
  2600				r = fetch_indirect_descs(vq, last, id);
  2601				if (unlikely(r < 0)) {
  2602					if (r != -EAGAIN)
  2603						vq_err(vq, "Failure detected "
  2604						       "in indirect descriptor at idx %d\n", id);
  2605					return ret;
  2606				}
  2607		}
  2608	
  2609		/* Now convert to IOV */
  2610		/* When we start there are none of either input nor output. */
  2611		*out_num = *in_num = 0;
  2612		if (unlikely(log))
  2613			*log_num = 0;
  2614	
  2615		for (i = vq->first_desc; i < vq->ndescs; ++i) {
  2616			unsigned iov_count = *in_num + *out_num;
  2617			struct vhost_desc *desc = &vq->descs[i];
  2618			int access;
  2619	
  2620			if (desc->flags & ~VHOST_DESC_FLAGS) {
  2621				vq_err(vq, "Unexpected flags: 0x%x at descriptor id 0x%x\n",
  2622				       desc->flags, desc->id);
  2623				ret = -EINVAL;
  2624				goto err;
  2625			}
  2626			if (desc->flags & VRING_DESC_F_WRITE)
  2627				access = VHOST_ACCESS_WO;
  2628			else
  2629				access = VHOST_ACCESS_RO;
  2630			ret = translate_desc(vq, desc->addr,
  2631					     desc->len, iov + iov_count,
  2632					     iov_size - iov_count, access);
  2633			if (unlikely(ret < 0)) {
  2634				if (ret != -EAGAIN)
  2635					vq_err(vq, "Translation failure %d descriptor idx %d\n",
  2636						ret, i);
  2637				goto err;
  2638			}
  2639			if (access == VHOST_ACCESS_WO) {
  2640				/* If this is an input descriptor,
  2641				 * increment that count. */
  2642				*in_num += ret;
  2643				if (unlikely(log && ret)) {
  2644					log[*log_num].addr = desc->addr;
  2645					log[*log_num].len = desc->len;
  2646					++*log_num;
  2647				}
  2648			} else {
  2649				/* If it's an output descriptor, they're all supposed
  2650				 * to come before any input descriptors. */
  2651				if (unlikely(*in_num)) {
  2652					vq_err(vq, "Descriptor has out after in: "
  2653					       "idx %d\n", i);
  2654					ret = -EINVAL;
  2655					goto err;
  2656				}
  2657				*out_num += ret;
  2658			}
  2659	
  2660			ret = desc->id;
  2661	
  2662			if (!(desc->flags & VRING_DESC_F_NEXT))
  2663				break;
  2664		}
  2665	
  2666		vq->first_desc = i + 1;
  2667	
  2668		return ret;
  2669	
  2670	err:
  2671		for (i = vq->first_desc; i < vq->ndescs; ++i)
> 2672			if (!(desc->flags & VRING_DESC_F_NEXT))
  2673				vhost_discard_vq_desc(vq, 1);
  2674		vq->ndescs = 0;
  2675	
  2676		return ret;
  2677	}
  2678	EXPORT_SYMBOL_GPL(vhost_get_vq_desc_batch);
  2679	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

Powered by blists - more mailing lists