[dpdk-dev] [PATCH] vfio: Fix overflow while assigning vfio BAR region offset and size

Thomas Monjalon thomas.monjalon at 6wind.com
Wed Jun 17 14:09:35 CEST 2015


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.


More information about the dev mailing list