kernel-fxtec-pro1x/drivers/xen
Juergen Gross 4172234498 xen/xenbus: ensure xenbus_map_ring_valloc() returns proper grant status
[ Upstream commit 6b51fd3f65a22e3d1471b18a1d56247e246edd46 ]

xenbus_map_ring_valloc() maps a ring page and returns the status of the
used grant (0 meaning success).

There are Xen hypervisors which might return the value 1 for the status
of a failed grant mapping due to a bug. Some callers of
xenbus_map_ring_valloc() test for errors by testing the returned status
to be less than zero, resulting in no error detected and crashing later
due to a not available ring page.

Set the return value of xenbus_map_ring_valloc() to GNTST_general_error
in case the grant status reported by Xen is greater than zero.

This is part of XSA-316.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wl@xen.org>
Link: https://lore.kernel.org/r/20200326080358.1018-1-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-05-02 17:25:58 +02:00
..
events xen/events: fix binding user event channels to cpus 2019-07-26 09:14:25 +02:00
xen-pciback xen/pciback: Check dev_data before using it 2019-12-05 09:20:26 +01:00
xenbus xen/xenbus: ensure xenbus_map_ring_valloc() returns proper grant status 2020-05-02 17:25:58 +02:00
xenfs
acpi.c
arm-device.c
balloon.c xen/balloon: fix ballooned page accounting without hotplug enabled 2020-01-09 10:18:58 +01:00
biomerge.c
cpu_hotplug.c xen, cpu_hotplug: Prevent an out of bounds access 2020-01-27 14:50:31 +01:00
dbgp.c
efi.c
evtchn.c xen/events: fix binding user event channels to cpus 2019-07-26 09:14:25 +02:00
fallback.c
features.c
gntalloc.c
gntdev-common.h
gntdev-dmabuf.c
gntdev-dmabuf.h
gntdev.c
grant-table.c
Kconfig xen/gntdev: Use select for DMA_SHARED_BUFFER 2019-12-31 16:35:50 +01:00
Makefile
manage.c
mcelog.c
mem-reservation.c
pci.c xen/pci: reserve MCFG areas earlier 2019-10-11 18:21:13 +02:00
pcpu.c
platform-pci.c
preempt.c xen: Enable interrupts when calling _cond_resched() 2020-02-28 16:39:00 +01:00
privcmd-buf.c
privcmd.c
privcmd.h
pvcalls-back.c net: add {READ|WRITE}_ONCE() annotations on ->rskq_accept_head 2020-01-27 14:51:18 +01:00
pvcalls-front.c pvcalls-front: don't return error when the ring is full 2019-12-17 20:35:32 +01:00
pvcalls-front.h
swiotlb-xen.c xen/swiotlb: fix condition for calling xen_destroy_contiguous_region() 2019-08-06 19:06:55 +02:00
sys-hypervisor.c
time.c
tmem.c
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c xen/balloon: Support xend-based toolstack take two 2020-02-11 04:34:08 -08:00
xen-scsiback.c
xen-selfballoon.c
xen-stub.c
xlate_mmu.c