From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=bMxb3F8EIGhTzBaDpd62fG5CQ6AY2Dnl7zjY7bLcr1U=; b=SCCImwK2bUqzJrSgFu97uBEjJhsOx2QyUi4oq3yxRkQZZTouGh2iGKi4e/D66c/7BJ fgXdfQBhQMFReu6nkv2+IAcD93bS7I4nLn5SqbR6gbxq7bVZwxxH6+m+xnNOsBbV5cGp j5EPKYN1iKEojGViWxbyUJeQaYUfgaLYCww0W6Xr/8AhnGtqLZ+a6CTpcA0qeHBhfxmt V8m89b1KFd4rDBjiVSneOY4QxnQYpBQRbkuVVzScIdDpr5oXLdksrhmAzqi46EZcGolz ot1SrzVPeVdDmvuJaQQWBA72LBrbEB5iRcu0R+YFQzpRjN89qJ0IT8edBDlDkyeDKI0s /PIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=bMxb3F8EIGhTzBaDpd62fG5CQ6AY2Dnl7zjY7bLcr1U=; b=rVhcaljVOQSn2KQ8DASQllA5SoUNKc3ppRsylwSW5ZYG2DOxcsZMEWMGVCXw86aGwU VRlaEqUh0qoHFj+6VHb5jxUBmyba21xubqfEk/Xy3iooiHWounv1EQCYgWw25kRBraEx hwEXY3rAQIgY03Qp332J6ot+Ub8tz5/NRFveZcVgy1pJAIXn7YXf8TV1mZT6r2+n62lm 9E3p+7YZfPyfNzW7lePyDd7yGMBiQtNrbFB+oyqnlX08A9fif1W5OTfGtCXLr/3IoVi1 aC1fD/Pesz7j8ttGlEjYy0E28nzsscdaVDj0B1rvk5tYvYXAM4tZMi3vJrYO0fXKUA/m Kx1A== X-Gm-Message-State: AFeK/H2PGdRpLV4AF7blyfLbtKBQFRmcX16c1aABByDNHGd9Ja5EXXvMn4Di7v+dRbIczxfo X-Received: by 10.223.176.13 with SMTP id f13mr4726514wra.124.1491351748608; Tue, 04 Apr 2017 17:22:28 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id v186sm20179035wmv.2.2017.04.04.17.22.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Apr 2017 17:22:27 -0700 (PDT) From: Thomas Monjalon To: Yuanhan Liu , Wenfeng Liu Cc: dev@dpdk.org, maxime.coquelin@redhat.com, stable@dpdk.org Date: Wed, 05 Apr 2017 02:22:27 +0200 Message-ID: <1865255.2VXnQj2pDH@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20170315080820.GM18844@yliu-dev.sh.intel.com> References: <1489486196-7456-1-git-send-email-liuwf@arraynetworks.com.cn> <20170315080820.GM18844@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] net/virtio-user: fix overflow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Apr 2017 00:22:29 -0000 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...