Thread (16 messages) 16 messages, 4 authors, 2015-07-14

Re: [PATCH v2] vfio: Fix overflow while assigning vfio BAR region offset and size

From: Thomas Monjalon <hidden>
Date: 2015-06-30 21:14:01

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 <redacted>
Signed-off-by: Kumar Sanghvi <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help