numam-dpdk/drivers/bus
Michal Krawczyk 8108393d98 vfio: fix truncated BAR offset for 32-bit
When 32-bit application is built on 64-bit system it is possible that
the offset of the resource is outside of the 32-bit value.

The problem with the unsigned long is, that it is 32-bit and not 64-bit
when using armhf compiler. Although the system is returning u64 value,
we are losing it's value if it's higher than 32-bit in the conversion
process. It can further cause mmap to fail due to offset being 0 or to
map not intended memory region.

To make it more portable, the uint64_t value is now being used for
storing offset instead of unsigned long. The size of being 32-bit seems
to be fine as the 32-bit application won't be able to access bigger
memory and it is further converted to size_t anyway. But for better
readability and to be consistent, it's type was changed to size_t as
well.

Fixes: 0205f87355 ("vfio: fix overflow of BAR region offset and size")
Cc: stable@dpdk.org

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-10-26 17:30:17 +02:00
..
dpaa common/dpaax: move OF library from DPAA bus 2019-10-23 16:43:08 +02:00
fslmc bus/fslmc: fix global variable multiple definitions 2019-10-25 23:16:22 +02:00
ifpga bus/ifpga: support AFU device search by name 2019-04-19 14:51:54 +02:00
pci vfio: fix truncated BAR offset for 32-bit 2019-10-26 17:30:17 +02:00
vdev doc: add vdev doxygen 2019-07-08 21:57:05 +02:00
vmbus remove useless include of EAL memory config header 2019-10-09 10:22:24 +02:00
Makefile bus/vmbus: add Hyper-V virtual bus support 2018-07-13 23:48:07 +02:00
meson.build bus/vmbus: add Hyper-V virtual bus support 2018-07-13 23:48:07 +02:00