1
0
Fork 0
alistair23-linux/drivers/xen/xenbus
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
..
Makefile
xenbus.h xen/xenbus/xen_bus_type: Support will_handle watch callback 2020-12-30 11:51:46 +01:00
xenbus_client.c xen/xenbus: Add 'will_handle' callback support in xenbus_watch_path() 2020-12-30 11:51:46 +01:00
xenbus_comms.c xenbus: req->err should be updated before req->state 2020-03-25 08:25:49 +01:00
xenbus_dev_backend.c
xenbus_dev_frontend.c
xenbus_probe.c xen/xenbus/xen_bus_type: Support will_handle watch callback 2020-12-30 11:51:46 +01:00
xenbus_probe_backend.c xenbus/xenbus_backend: Disallow pending watch messages 2020-12-30 11:51:47 +01:00
xenbus_probe_frontend.c
xenbus_xs.c xen/xenbus: Count pending messages for each watch 2020-12-30 11:51:47 +01:00