linux/drivers/vfio
Jason Gunthorpe 0886196ca8 vfio: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations
Use GFP_KERNEL_ACCOUNT for userspace persistent allocations.

The GFP_KERNEL_ACCOUNT option lets the memory allocator know that this
is untrusted allocation triggered from userspace and should be a subject
of kmem accounting, and as such it is controlled by the cgroup
mechanism.

The way to find the relevant allocations was for example to look at the
close_device function and trace back all the kfrees to their
allocations.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20230108154427.32609-4-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2023-01-23 11:26:29 -07:00
..
fsl-mc VFIO updates for v6.2-rc1 2022-12-15 13:12:15 -08:00
mdev vfio-mdev: turn VFIO_MDEV into a selectable symbol 2023-01-23 11:26:29 -07:00
pci vfio: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations 2023-01-23 11:26:29 -07:00
platform vfio: platform: No need to check res again 2023-01-23 11:26:28 -07:00
container.c vfio: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations 2023-01-23 11:26:29 -07:00
group.c Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
iommufd.c vfio-iommufd: Support iommufd for emulated VFIO devices 2022-12-02 11:52:03 -04:00
iova_bitmap.c vfio/iova_bitmap: refactor iova_bitmap_set() to better handle page boundaries 2022-12-02 10:09:25 -07:00
Kconfig VFIO updates for v6.2-rc1 2022-12-15 13:12:15 -08:00
Makefile VFIO updates for v6.2-rc1 2022-12-15 13:12:15 -08:00
vfio_iommu_spapr_tce.c vfio: Move vfio_spapr_iommu_eeh_ioctl into vfio_iommu_spapr_tce.c 2022-12-05 12:04:32 -07:00
vfio_iommu_type1.c Merge branches 'apple/dart', 'arm/mediatek', 'arm/omap', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next 2022-09-26 15:52:31 +02:00
vfio_main.c VFIO updates for v6.2-rc1 2022-12-15 13:12:15 -08:00
vfio.h VFIO updates for v6.2-rc1 2022-12-15 13:12:15 -08:00
virqfd.c vfio: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations 2023-01-23 11:26:29 -07:00