From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: Wenfeng Liu <liuwf@arraynetworks.com.cn>,
dev@dpdk.org, maxime.coquelin@redhat.com, stable@dpdk.org
Subject: Re: [PATCH v2] net/virtio-user: fix overflow
Date: Wed, 5 Apr 2017 13:23:06 +0800 [thread overview]
Message-ID: <20170405052306.GF18844@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <1865255.2VXnQj2pDH@xps13>
On Wed, Apr 05, 2017 at 02:22:27AM +0200, Thomas Monjalon wrote:
> 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.
Thanks!
> Considering this log is about an error,
> does it make sense to have a compile option to enable it?
I think it makes more sense to print them unconditionally? They are
errors after all.
--yliu
> I was expecting that "git grep 'PMD_INIT_LOG(ERR,' | wc -l" would return 0.
> Unfortunately, there are 434 occurences...
prev parent reply other threads:[~2017-04-05 5:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 10:09 [PATCH v2] net/virtio-user: fix overflow Wenfeng Liu
2017-03-15 8:08 ` Yuanhan Liu
2017-04-05 0:22 ` Thomas Monjalon
2017-04-05 5:23 ` Yuanhan Liu [this message]
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=20170405052306.GF18844@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=dev@dpdk.org \
--cc=liuwf@arraynetworks.com.cn \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
--cc=thomas.monjalon@6wind.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.