1
0
Fork 0
alistair23-linux/drivers/xen
SeongJae Park 68d139a974 xenbus/xenbus_backend: Disallow pending watch messages
commit 9996bd4947 upstream.

'xenbus_backend' watches 'state' of devices, which is writable by
guests.  Hence, if guests intensively updates it, dom0 will have lots of
pending events that exhausting memory of dom0.  In other words, guests
can trigger dom0 memory pressure.  This is known as XSA-349.  However,
the watch callback of it, 'frontend_changed()', reads only 'state', so
doesn't need to have the pending events.

To avoid the problem, this commit disallows pending watch messages for
'xenbus_backend' using the 'will_handle()' watch callback.

This is part of XSA-349

Cc: stable@vger.kernel.org
Signed-off-by: SeongJae Park <sjpark@amazon.de>
Reported-by: Michael Kurth <mku@amazon.de>
Reported-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-30 11:51:47 +01:00
..
events xen/events: block rogue events for some time 2020-11-05 11:43:12 +01:00
xen-pciback xen/xenbus: Add 'will_handle' callback support in xenbus_watch_path() 2020-12-30 11:51:46 +01:00
xenbus xenbus/xenbus_backend: Disallow pending watch messages 2020-12-30 11:51:47 +01:00
xenfs
Kconfig
Makefile
acpi.c
arm-device.c
balloon.c xen/balloon: make the balloon wait interruptible 2020-08-19 08:16:29 +02:00
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c xen/events: switch user event channels to lateeoi model 2020-11-05 11:43:11 +01:00
features.c
gntalloc.c
gntdev-common.h
gntdev-dmabuf.c xen/gntdev: Fix dmabuf import with non-zero sgt offset 2020-08-19 08:16:29 +02:00
gntdev-dmabuf.h
gntdev.c xen/gntdev.c: Mark pages as dirty 2020-11-01 12:01:06 +01:00
grant-table.c
manage.c
mcelog.c
mem-reservation.c
pci.c
pcpu.c
platform-pci.c
preempt.c xen: don't reschedule in preemption off sections 2020-08-26 10:41:07 +02:00
privcmd-buf.c
privcmd.c
privcmd.h
pvcalls-back.c xen/pvcallsback: use lateeoi irq binding 2020-11-05 11:43:11 +01:00
pvcalls-front.c
pvcalls-front.h
swiotlb-xen.c swiotlb-xen: use vmalloc_to_page on vmalloc virt addresses 2020-08-26 10:40:56 +02:00
sys-hypervisor.c
time.c
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c
xen-front-pgdir-shbuf.c
xen-scsiback.c xen/scsiback: use lateeoi irq binding 2020-11-05 11:43:11 +01:00
xen-stub.c
xlate_mmu.c