linux/drivers/xen
Juergen Gross 70045cf659 xen/gntdev: remove struct gntdev_copy_batch from stack
When compiling the kernel with LLVM, the following warning was issued:

  drivers/xen/gntdev.c:991: warning: stack frame size (1160) exceeds
  limit (1024) in function 'gntdev_ioctl'

The main reason is struct gntdev_copy_batch which is located on the
stack and has a size of nearly 1kb.

For performance reasons it shouldn't by just dynamically allocated
instead, so allocate a new instance when needed and instead of freeing
it put it into a list of free structs anchored in struct gntdev_priv.

Fixes: a4cdb556ca ("xen/gntdev: add ioctl for grant copy")
Reported-by: Abinash Singh <abinashsinghlalotra@gmail.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Message-ID: <20250703073259.17356-1-jgross@suse.com>
2025-07-14 17:10:09 +02:00
..
events x86/apic: Convert to IRQCHIP_MOVE_DEFERRED 2025-01-15 21:38:53 +01:00
xen-pciback xen-pciback: Replace scnprintf() with sysfs_emit_at() 2025-07-14 09:35:42 +02:00
xenbus xen: Remove some deadcode (x) 2025-07-14 09:55:52 +02:00
xenfs xenfs/xensyms: respect hypervisor's "next" indication 2025-03-14 11:18:59 +01:00
acpi.c xen: Remove dependency between pciback and privcmd 2024-10-18 11:59:04 +02:00
arm-device.c
balloon.c xen/x86: fix initial memory balloon target 2025-05-23 07:09:00 +02:00
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
features.c
gntalloc.c xen/gntalloc: Replace UAPI 1-element array 2024-02-13 09:06:48 +01:00
gntdev-common.h xen/gntdev: remove struct gntdev_copy_batch from stack 2025-07-14 17:10:09 +02:00
gntdev-dmabuf.c xen: fix UAF in dmabuf_exp_from_pages() 2025-07-14 10:12:07 +02:00
gntdev-dmabuf.h
gntdev.c xen/gntdev: remove struct gntdev_copy_batch from stack 2025-07-14 17:10:09 +02:00
grant-dma-iommu.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
grant-dma-ops.c change alloc_pages name in dma_map_ops to avoid name conflicts 2024-04-25 20:55:53 -07:00
grant-table.c
Kconfig xen: Change xen-acpi-processor dom0 dependency 2025-04-07 11:22:40 +02:00
Makefile
manage.c xen: Remove some deadcode (x) 2025-07-14 09:55:52 +02:00
mcelog.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
mem-reservation.c
pci.c xen/pci: Do not register devices with segments >= 0x10000 2025-03-21 08:15:26 +01:00
pcpu.c xen: pcpu: remove unnecessary __ref annotation 2025-01-20 09:44:39 +01:00
platform-pci.c xen: Add support for XenServer 6.1 platform device 2025-03-14 11:04:25 +01:00
privcmd-buf.c xen: add missing MODULE_DESCRIPTION() macros 2024-07-02 09:41:46 +02:00
privcmd.c the bulk of struct fd memory safety stuff 2024-11-18 12:24:06 -08:00
privcmd.h
pvcalls-back.c net: change proto and proto_ops accept type 2024-05-13 18:19:09 -06:00
pvcalls-front.c xen: update pvcalls_front_accept prototype 2025-01-22 16:32:08 +01:00
pvcalls-front.h xen: update pvcalls_front_accept prototype 2025-01-22 16:32:08 +01:00
swiotlb-xen.c xen: swiotlb: Wire up map_resource callback 2025-05-23 07:05:50 +02:00
sys-hypervisor.c
time.c xen: Remove some deadcode (x) 2025-07-14 09:55:52 +02:00
unpopulated-alloc.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c xen: balloon: make balloon_subsys const 2024-02-13 09:03:34 +01:00
xen-front-pgdir-shbuf.c xen/shbuf: eliminate 17 kernel-doc warnings 2023-11-13 08:14:42 +01:00
xen-scsiback.c
xlate_mmu.c