patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>,
	Wenfeng Liu <liuwf@arraynetworks.com.cn>
Cc: dev@dpdk.org, maxime.coquelin@redhat.com, stable@dpdk.org
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] net/virtio-user: fix overflow
Date: Wed, 05 Apr 2017 02:22:27 +0200	[thread overview]
Message-ID: <1865255.2VXnQj2pDH@xps13> (raw)
In-Reply-To: <20170315080820.GM18844@yliu-dev.sh.intel.com>

2017-03-15 16:08, Yuanhan Liu:
> On Tue, Mar 14, 2017 at 10:09:56AM +0000, Wenfeng Liu wrote:
> > virtio-user limits the qeueue number to 8 but provides no limit
> > check against the queue number input from user. If a bigger queue
> > number (> 8) is given, there is an overflow issue. Doing a sanity
> > check could avoid it.
> > 
> > Fixes: 37a7eb2ae816 ("net/virtio-user: add device emulation layer")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Wenfeng Liu <liuwf@arraynetworks.com.cn>
> 
> Applied to dpdk-next-virtio.

There is a compilation error when RTE_LIBRTE_VIRTIO_DEBUG_INIT is enabled:
drivers/net/virtio/virtio_user_ethdev.c:423:32:
fatal error: format specifies type 'unsigned int'
but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
                        VIRTIO_USER_ARG_QUEUES_NUM, queues,
                                                    ^~~~~~

I will fix it when pulling next-virtio.

Considering this log is about an error,
does it make sense to have a compile option to enable it?
I was expecting that "git grep 'PMD_INIT_LOG(ERR,' | wc -l" would return 0.
Unfortunately, there are 434 occurences...

  reply	other threads:[~2017-04-05  0:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 10:09 [dpdk-stable] " Wenfeng Liu
2017-03-15  8:08 ` Yuanhan Liu
2017-04-05  0:22   ` Thomas Monjalon [this message]
2017-04-05  5:23     ` [dpdk-stable] [dpdk-dev] " Yuanhan Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1865255.2VXnQj2pDH@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=liuwf@arraynetworks.com.cn \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    --cc=yuanhan.liu@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).