From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v2] net/virtio-user: fix overflow Date: Wed, 5 Apr 2017 13:23:06 +0800 Message-ID: <20170405052306.GF18844@yliu-dev.sh.intel.com> References: <1489486196-7456-1-git-send-email-liuwf@arraynetworks.com.cn> <20170315080820.GM18844@yliu-dev.sh.intel.com> <1865255.2VXnQj2pDH@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Wenfeng Liu , dev@dpdk.org, maxime.coquelin@redhat.com, stable@dpdk.org To: Thomas Monjalon Return-path: Content-Disposition: inline In-Reply-To: <1865255.2VXnQj2pDH@xps13> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > > > > 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...