numam-dpdk/drivers
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
..
baseband baseband/fpga_lte_fec: fix polling of MMIO register 2019-10-23 16:57:06 +02:00
bus vfio: fix truncated BAR offset for 32-bit 2019-10-26 17:30:17 +02:00
common common/octeontx2: upgrade mbox definition to version 2 2019-10-23 16:43:10 +02:00
compress compress/octeontx: fix global variable multiple definitions 2019-10-25 23:16:23 +02:00
crypto crypto/virtio: fix global variable multiple definitions 2019-10-25 23:16:23 +02:00
event common/dpaax: move OF library from DPAA bus 2019-10-23 16:43:08 +02:00
mempool common/dpaax: move OF library from DPAA bus 2019-10-23 16:43:08 +02:00
net net/igb: fix global variable multiple definitions 2019-10-25 23:16:23 +02:00
raw common/dpaax: move OF library from DPAA bus 2019-10-23 16:43:08 +02:00
Makefile drivers: add common as dependency for bus 2018-10-16 14:54:25 +02:00
meson.build build: fix compatibility with meson 0.47 2019-10-25 09:45:51 +02:00