From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] net/virtio-user: fix overflow Date: Wed, 05 Apr 2017 02:22:27 +0200 Message-ID: <1865255.2VXnQj2pDH@xps13> References: <1489486196-7456-1-git-send-email-liuwf@arraynetworks.com.cn> <20170315080820.GM18844@yliu-dev.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, maxime.coquelin@redhat.com, stable@dpdk.org To: Yuanhan Liu , Wenfeng Liu Return-path: Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) by dpdk.org (Postfix) with ESMTP id D8015326C for ; Wed, 5 Apr 2017 02:22:28 +0200 (CEST) Received: by mail-wr0-f175.google.com with SMTP id k6so221604303wre.2 for ; Tue, 04 Apr 2017 17:22:28 -0700 (PDT) In-Reply-To: <20170315080820.GM18844@yliu-dev.sh.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. 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...