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

Thomas Monjalon thomas.monjalon at 6wind.com
Tue Jun 30 23:12:52 CEST 2015


Hi Anatoly,
Please could you review this fix to allow Chelsio using VFIO?
Thanks

2015-06-23 20:30, Rahul Lakkireddy:
> When using vfio, the probe fails over Chelsio T5 adapters after
> commit-id 90a1633b2 (eal/linux: allow to map BARs with MSI-X tables).
> 
> While debugging further, found that the BAR region offset and size read from
> vfio are u64, but are assigned to uint32_t variables.  This results in the u64
> value getting truncated to 0 and passing wrong offset and size to mmap for
> subsequent BAR regions (i.e. trying to overwrite previously allocated BAR 0
> region).
> 
> The fix is to use these region offset and size directly rather than assigning
> to uint32_t variables.
> 
> Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables")
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>
> Signed-off-by: Kumar Sanghvi <kumaras at chelsio.com>



More information about the dev mailing list