From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] vfio: Fix overflow while assigning vfio BAR region offset and size Date: Wed, 17 Jun 2015 14:09:35 +0200 Message-ID: <1931055.A5YAhvXmAm@xps13> References: <61d1c9174f7f9159d4005dd2cea16c7719cec964.1434462470.git.rahul.lakkireddy@chelsio.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Felix Marti , Nirranjan Kirubaharan , Kumar Sanghvi To: Rahul Lakkireddy Return-path: Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by dpdk.org (Postfix) with ESMTP id F1158C40C for ; Wed, 17 Jun 2015 14:10:35 +0200 (CEST) Received: by wiga1 with SMTP id a1so137434499wig.0 for ; Wed, 17 Jun 2015 05:10:35 -0700 (PDT) In-Reply-To: <61d1c9174f7f9159d4005dd2cea16c7719cec964.1434462470.git.rahul.lakkireddy@chelsio.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Rahul, 2015-06-16 19:46, Rahul Lakkireddy: > After the commit-id 90a1633b2 (eal/linux: allow to map BARs with MSI-X tables), Please show this information before the Signed-off-by lines: Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables") generated with this git alias: fixline = log -1 --abbrev=12 --format='Fixes: %h (\"%s\")' > VFIO stopped working. On further debug, found that although BAR region I suppose the whole VFIO didn't stopped working. Please precise the conditions of the failures (large offset, etc). > offset and size from vfio are read as u64, they are truncated when assigned to > uint32_t variables resulting in wrong offset being passed for mmap. > > The fix is to use uint64_t for offset and size. Unfortunately, it doesn't build for 32-bit target.