mirror-linux/drivers/vfio
Matt Evans 702809dabd vfio/pci: Check BAR resources before exporting a DMABUF
A DMABUF exports access to BAR resources and, although they are
requested at startup time, we need to ensure they really were reserved
before exporting.  Otherwise, it's possible to access unreserved
resources through the export.

Add a check to the DMABUF-creation path.

Fixes: 5d74781ebc ("vfio/pci: Add dma-buf export support for MMIO regions")
Signed-off-by: Matt Evans <mattev@meta.com>
Link: https://lore.kernel.org/r/20260511145829.2993601-3-mattev@meta.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
2026-05-14 11:39:03 -06:00
..
cdx vfio/cdx: Consolidate MSI configured state onto cdx_irqs 2026-04-21 12:01:22 -06:00
fsl-mc bus: fsl-mc: use generic driver_override infrastructure 2026-04-04 20:41:25 +02:00
mdev Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pci vfio/pci: Check BAR resources before exporting a DMABUF 2026-05-14 11:39:03 -06:00
platform treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
Kconfig
Makefile
container.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
debugfs.c vfio: Dump migration features under debugfs 2025-10-06 11:22:48 -06:00
device_cdev.c vfio: replace vfio->device_class with a const struct class 2026-04-21 12:01:21 -06:00
group.c vfio: remove dead notifier code 2026-04-10 13:32:25 -06:00
iommufd.c vfio: Fix unbalanced vfio_df_close call in no-iommu mode 2025-07-11 14:43:37 -06:00
vfio.h vfio: replace vfio->device_class with a const struct class 2026-04-21 12:01:21 -06:00
vfio_iommu_spapr_tce.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vfio_iommu_type1.c vfio: remove dead notifier code 2026-04-10 13:32:25 -06:00
vfio_main.c vfio: replace vfio->device_class with a const struct class 2026-04-21 12:01:21 -06:00
virqfd.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00