linux-stable/drivers/xen
Juergen Gross 1ebdc3d180 xen: remove size limit of privcmd-buf mapping interface
commit 3941552aec upstream.

Currently the size of hypercall buffers allocated via
/dev/xen/hypercall is limited to a default of 64 memory pages. For live
migration of guests this might be too small as the page dirty bitmask
needs to be sized according to the size of the guest. This means
migrating a 8GB sized guest is already exhausting the default buffer
size for the dirty bitmap.

There is no sensible way to set a sane limit, so just remove it
completely. The device node's usage is limited to root anyway, so there
is no additional DOS scenario added by allowing unlimited buffers.

While at it make the error path for the -ENOMEM case a little bit
cleaner by setting n_pages to the number of successfully allocated
pages instead of the target size.

Fixes: c51b3c639e ("xen: add new hypercall buffer mapping device")
Cc: <stable@vger.kernel.org> #4.18
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-13 11:08:52 -08:00
..
events xen: fix GCC warning and remove duplicate EVTCHN_ROW/EVTCHN_COL usage 2018-09-14 08:51:10 -04:00
xen-pciback treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
xenbus xen: export device state to sysfs 2018-08-28 17:37:40 -04:00
xenfs License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acpi.c
arm-device.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
balloon.c xen/balloon: Share common memory reservation routines 2018-07-26 23:05:13 -04:00
biomerge.c xen/biomerge: Use true and false for boolean values 2018-08-06 10:20:57 -04:00
cpu_hotplug.c xen: avoid crash in disable_hotplug_cpu 2018-09-14 08:51:10 -04:00
dbgp.c
efi.c xen: Implement EFI reset_system callback 2017-05-02 12:06:50 +02:00
evtchn.c treewide: kvmalloc() -> kvmalloc_array() 2018-06-12 16:19:22 -07:00
fallback.c
features.c
gntalloc.c mm: treewide: remove GFP_TEMPORARY allocation flag 2017-09-13 18:53:16 -07:00
gntdev-common.h xen/gntdev: Add initial support for dma-buf UAPI 2018-07-26 23:05:14 -04:00
gntdev-dmabuf.c drm pull for 4.19-rc1 2018-08-15 17:39:07 -07:00
gntdev-dmabuf.h xen/gntdev: Add initial support for dma-buf UAPI 2018-07-26 23:05:14 -04:00
gntdev.c xen/gntdev: fix up blockable calls to mn_invl_range_start 2018-09-14 08:52:30 -04:00
grant-table.c xen: issue warning message when out of grant maptrack entries 2018-09-19 11:27:42 -04:00
Kconfig xen/balloon: add runtime control for scrubbing ballooned out pages 2018-09-14 08:51:10 -04:00
Makefile xen/gntdev: Add initial support for dma-buf UAPI 2018-07-26 23:05:14 -04:00
manage.c xen/manage: don't complain about an empty value in control/sysrq node 2018-09-14 08:51:10 -04:00
mcelog.c xen/mcelog: eliminate redundant setting of interface version 2018-08-20 14:46:18 -04:00
mem-reservation.c xen/balloon: add runtime control for scrubbing ballooned out pages 2018-09-14 08:51:10 -04:00
pci.c
pcpu.c
platform-pci.c xen-platform: constify pci_device_id. 2017-08-31 09:45:55 -04:00
preempt.c
privcmd-buf.c xen: remove size limit of privcmd-buf mapping interface 2018-11-13 11:08:52 -08:00
privcmd.c xen: add new hypercall buffer mapping device 2018-06-22 08:26:42 +02:00
privcmd.h xen: add new hypercall buffer mapping device 2018-06-22 08:26:42 +02:00
pvcalls-back.c xen/pvcalls: fix null pointer dereference on map->sock 2018-02-26 17:13:12 +01:00
pvcalls-front.c pvcalls-front: 64-bit align flags 2018-03-01 07:23:36 +01:00
pvcalls-front.h xen: fix poll misannotation 2018-02-01 10:07:32 -05:00
swiotlb-xen.c xen-swiotlb: use actually allocated size on check physical continuous 2018-11-13 11:08:40 -08:00
sys-hypervisor.c xen: add sysfs node for hypervisor build id 2017-06-15 08:50:37 +02:00
time.c xen: features and fixes for v4.15-rc1 2017-11-16 13:06:27 -08:00
tmem.c mm, swap, frontswap: fix THP swap if frontswap enabled 2018-02-21 15:35:43 -08:00
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c
xen-acpi-pad.c
xen-acpi-processor.c xen/ACPI: don't upload Px/Cx data for disabled processors 2018-08-20 14:46:18 -04:00
xen-balloon.c xen/balloon: Support xend-based toolstack 2018-11-13 11:08:40 -08:00
xen-scsiback.c SCSI misc on 20180815 2018-08-15 22:06:26 -07:00
xen-selfballoon.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xen-stub.c
xlate_mmu.c