kernel_samsung_a53x/drivers/xen
Oleksandr Tyshchenko 2ba92da4d5 xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import
[ Upstream commit 2d2db7d40254d5fb53b11ebd703cd1ed0c5de7a1 ]

DO NOT access the underlying struct page of an sg table exported
by DMA-buf in dmabuf_imp_to_refs(), this is not allowed.
Please see drivers/dma-buf/dma-buf.c:mangle_sg_table() for details.

Fortunately, here (for special Xen device) we can avoid using
pages and calculate gfns directly from dma addresses provided by
the sg table.

Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Link: https://lore.kernel.org/r/20240107103426.2038075-1-olekstysh@gmail.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:13:19 +01:00
..
events xen/events: fix delayed eoi list handling 2024-11-18 11:43:19 +01:00
xen-pciback xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled 2024-11-18 11:42:55 +01:00
xenbus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xenfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arm-device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
balloon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
biomerge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu_hotplug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dbgp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
efi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
evtchn.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
features.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gntalloc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gntdev-common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gntdev-dmabuf.c xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import 2024-11-18 12:13:19 +01:00
gntdev-dmabuf.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gntdev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
grant-table.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
manage.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcelog.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mem-reservation.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcpu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
platform-pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
privcmd-buf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
privcmd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
privcmd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pvcalls-back.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pvcalls-front.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pvcalls-front.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
swiotlb-xen.c swiotlb-xen: provide the "max_mapping_size" method 2024-11-18 12:10:57 +01:00
sys-hypervisor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
time.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
unpopulated-alloc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-acpi-cpuhotplug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-acpi-memhotplug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-acpi-pad.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-acpi-processor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-balloon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-front-pgdir-shbuf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-scsiback.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-stub.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xlate_mmu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00