android_kernel_motorola_sm6225/arch/arm/xen
Jan Beulich 1a999d25ef Xen/gnttab: handle p2m update errors on a per-slot basis
commit 8310b77b48c5558c140e7a57a702e7819e62f04e upstream.

Bailing immediately from set_foreign_p2m_mapping() upon a p2m updating
error leaves the full batch in an ambiguous state as far as the caller
is concerned. Instead flags respective slots as bad, unmapping what
was mapped there right away.

HYPERVISOR_grant_table_op()'s return value and the individual unmap
slots' status fields get used only for a one-time - there's not much we
can do in case of a failure.

Note that there's no GNTST_enomem or alike, so GNTST_general_error gets
used.

The map ops' handle fields get overwritten just to be on the safe side.

This is part of XSA-367.

Cc: <stable@vger.kernel.org>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/96cccf5d-e756-5f53-b91a-ea269bfb9be0@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-07 12:19:01 +01:00
..
efi.c xen/efi: Set nonblocking callbacks 2019-10-29 09:19:33 +01:00
enlighten.c arm/xen: Don't probe xenbus as part of an early initcall 2021-02-23 15:00:56 +01:00
grant-table.c xen: re-introduce support for grant v2 interface 2017-11-06 15:50:17 -05:00
hypercall.S xen/privcmd: Add IOCTL_PRIVCMD_DM_OP 2017-02-14 15:13:43 -05:00
Makefile ARM64: XEN: Add a function to initialize Xen specific UEFI runtime services 2016-07-06 10:34:46 +01:00
mm.c xen-swiotlb: consolidate xen_swiotlb_dma_ops 2017-06-20 11:12:59 +02:00
p2m.c Xen/gnttab: handle p2m update errors on a per-slot basis 2021-03-07 12:19:01 +01:00